Question

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?

Was it helpful?

Solution

I don't know if it's possible to access songs or information about them from Google Music Beta outside of that app.

Someone more knowledgeable than I might be able to offer a solution, but I can at least offer some thoughts. Even if it's possible, I'm almost positive that the way you are trying to do it right now won't work.

Music Beta does download songs and make them available for use offline, but it doesn't store them in the normal location for music. If it did, then other music apps would index those songs and be able to play them. This is not the case, so the songs must be stored elsewhere. I've tried searching through the SD card to find the music but I haven't had any success.

This makes sense when you think about it, because Google doesn't want music players developed by others (Amazon for instance) to play songs from Google Music Beta.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top