Advertisement
Guest User

AlbumArt

a guest
Jun 18th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Cursor cursor = getActivity().managedQuery(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI,
  2. new String[] {MediaStore.Audio.Albums._ID, MediaStore.Audio.Albums.ALBUM_ART},
  3. MediaStore.Audio.Albums._ID+ "=?",
  4. new String[] {String.valueOf(albumId)},
  5. null);
  6.  
  7. if (cursor.moveToFirst()) {
  8. String path = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Albums.ALBUM_ART));
  9. // do whatever you need to do
  10.  
  11. Bitmap albumArt = BitmapFactory.decodeFile(String path);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement