Reputation: 1213
I want to know if there is any listener or method to know someone deleting any file from phone storage. When I delete anything I want to create a backup of those files.
Upvotes: 3
Views: 703
Reputation: 1213
I have found code from File System Listener
new FileObserver(Your_path) {
@Override
public void onEvent(int event, String path) {
if (event == FileObserver.DELETE)
// File is deleted ,Do what you want
}
}.startWatching();
Upvotes: 2