I am new to Android development , I am having trouble in tracking the deleted files like audio, video, images etc. I want to get all details of a deleted file and later I want to move deleted files in a separate folder.
Asked
Active
Viewed 713 times
2 Answers
1
In android, files are managed through content providers. For each file there is an index in content provider and that we access them using cursor. you can keep track of index from content provider using cursor and move it to other place and update content provider

Sushil
- 8,250
- 3
- 39
- 71
-
Please explain in details... – Mudit Mishra Aug 08 '13 at 06:25
-
I am having same problem. please explain with code if u hav – Atul Bhardwaj Aug 08 '13 at 07:01
0
// Defines selection criteria for the rows you want to delete
String mSelectionClause = UserDictionary.Words.APP_ID + " LIKE ?";
String[] mSelectionArgs = {"user"};
// Defines a variable to contain the number of rows deleted
int mRowsDeleted = 0;
...
// Deletes the words that match the selection criteria
mRowsDeleted = getContentResolver().delete(
UserDictionary.Words.CONTENT_URI, // the user dictionary content URI
mSelectionClause // the column to select on
mSelectionArgs // the value to compare to
);
For more details visit the link to understand content providers:
http://developer.android.com/guide/topics/providers/content-provider-basics.html

Sushil
- 8,250
- 3
- 39
- 71