android - Delete file function calling in intent does not work -
i developing android application importing csv file sqlite. work flow of application follows:
- delete old csv files in device using deleterecursive function
- download csv files through ftp server
- 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
Post a Comment