I'm trying to get the artworks on a device that syncs mp3s with Google Music Beta. So I try the standard approach using a cursor to get all the album IDS and than for each of them the correspondent artwork:
public void getAlbumIDS(){
Cursor cur = mContentResolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, new String [] {MediaStore.Audio.Media.ALBUM_ID}, null, null, null);
startManagingCursor(cur);
if (cur.getCount() > 0) {
while (cur.moveToNext()) {
int albumId = cur.getInt(cur.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));
// Do stuff with albumId
}
}
cur.close();
stopManagingCursor(cur);
}
with this I should get all the IDS of the albums synced with the device, but cur.getCount() is equal to zero.
I know that this is the right way to get info when music is stored in the device (in fact in that case everything works fine), but I'm getting crazy to retrieve artworks synced with Google Music Beta...
Could you please help me?