I\'m writing an app that removes files that may or may not be listed in any one of the types of media libraries such as music or pictures. While I can use the MediaSca
MediaSca
Easy as pie: whenever you add a file, let MediaStore ContentProvider knows about it using
MediaStore
ContentProvider
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(fileToAddInMediaStore)));
For deletion: just use
getContentResolver().delete(Uri.fromFile(fileToDeleteFromMediaStore), null, null)