Please reply me ,
public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub if (intent.getAction().equalsIgnoreCase( "android.intent.action.UMS_CONNECTED")) { serviceFlag=true; TextView textView = new TextView(context); textView.setBackgroundColor(Color.MAGENTA); textView.setTextColor(Color.BLUE); textView.setPadding(10,10,10,10); textView.setText("USB connected………."); Toast toastView = new Toast(context); toastView.setDuration(Toast.LENGTH_LONG); toastView.setGravity(Gravity.CENTER, 0,0); toastView.setView(textView); toastView.show(); Log.i(TAG,"USB connected.."); Timer timer = new Timer(); if(serviceFlag){ timer.schedule(new TimerTask() { public void run() { System.out.println("Timeschedule"); FileNameArr.clear(); GetDirFiles("/sdcard/TvAnyTime"); for(int i=0;i<FileNameArr.size();i++){ File sdcard = Environment.getExternalStorageDirectory(); File from = new File(sdcard+"/TvAnyTime/",FileNameArr.get(i)); File to = new File(sdcard+"/TvAnyTime/watch",FileNameArr.get(i)); from.renameTo(to); System.out.println("MoveFile######"+FileNameArr.get(i)); } } }, 0, 7000); } }} Here broad cast receiver detecting message showing file name , but not moving file from one directory to other. what issue behind it. this code working i have tested with sample but here issue On Thu, Nov 17, 2011 at 6:04 PM, Naveen <kumarnaveen.si...@gmail.com> wrote: > i want to assign a task for copy a file to receiver class. how to > handle that cases in android.receiver class is able to generate > message but not copying the file . how to handle that cases. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en