Android: How to remove files from External storage? -



Android: How to remove files from External storage? -

i implementing application generates , create files in external storage. can guys help me how can remove that?

thank you, chandra

edit-1: added next code , still getting same problem, please have @ code below,

string fullpath = "/mnt/sdcard/"; system.out.println(fullpath); seek { file file = new file(fullpath, "audio.mp3"); if(file.exists()) { boolean result = file.delete(); system.out.println("application able delete file , result is: " + result); // file.delete(); } else { system.out.println("application doesn't able delete file"); } } grab (exception e) { log.e("app", "exception while deleting file " + e.getmessage()); }

in logcat getting application able delete file , result is:false. attached screen shot after executing this. please have that. , suggest me.

file file = new file(selectedfilepath); boolean deleted = file.delete();

where selectedfilepath path of file want delete - example:

/sdcard/yourcustomdirectory/examplefile.mp3

android

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -