android - Delete file function calling in intent does not work -


i developing android application importing csv file sqlite. work flow of application follows:

  1. delete old csv files in device using deleterecursive function
  2. download csv files through ftp server
  3. import csv files database.

when trying add main menu "import button" call original activity. deleterecursive function not work anymore.

here code of deleterecursive:

void deleterecursive(file fileordirectory) {     if (fileordirectory.isdirectory())         (file child : fileordirectory.listfiles())             deleterecursive(child);      fileordirectory.delete(); } 

can tell me why? there special setting intent in order write permission?

do have permission in manifest? (assuming files in external storage)

uses-permission android:name="android.permission.write_external_storage"   

the deleterecursive function not work anymore

i guessing problem not logic of deleterecursive(); else. print things using logcat , see going on. try removing import button , test app deleting dummy files. if delete, problem addition of button.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -