Search code examples
androidandroid-contentprovidermediastore

Delete Album Art of album in Content Provider


I am trying to delete album art for an album by its album id. I tried many approaches already. One of them is below:

Uri uri = Uri.parse("content://media/external/audio/albumart");
int deleted = contentResolver.delete(ContentUris.withAppendedId(uri, albumId), null, null);

I checked the value of the 'deleted' variable and it always equals 1 so that deleted one row as expected. But when I retrieve album art by the same id (Using Glide.load(uri)) it loads the old art.

I am a little confused. Can anybody explain me please what I am doing wrong?


Solution

  • Assuming it is deleted correctly, maybe is Glide cache? Try to delete it and see what happens