[GH-ISSUE #18] How to display pictures in metadata on android #14

Closed
opened 2026-02-28 14:24:03 +03:00 by kerem · 1 comment
Owner

Originally created by @JShaoLee on GitHub (Jul 1, 2022).
Original GitHub issue: https://github.com/devgianlu/librespot-android/issues/18

How to display pictures in metadata on android,Android imageview does not support direct display of this data
below code right?

`

                  for (Metadata.Image image : track.getAlbum().getCoverList()) {
                        if (image.hasFileId() && image.hasSize()) {
                            byte[] imageBytes = image.toByteArray();
                            imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));
                            break;
                        }
                    }

`

Originally created by @JShaoLee on GitHub (Jul 1, 2022). Original GitHub issue: https://github.com/devgianlu/librespot-android/issues/18 How to display pictures in metadata on android,Android imageview does not support direct display of this data below code right? ` for (Metadata.Image image : track.getAlbum().getCoverList()) { if (image.hasFileId() && image.hasSize()) { byte[] imageBytes = image.toByteArray(); imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length)); break; } } `
kerem closed this issue 2026-02-28 14:24:03 +03:00
Author
Owner

@JShaoLee commented on GitHub (Jul 1, 2022):

Solved

<!-- gh-comment-id:1172157661 --> @JShaoLee commented on GitHub (Jul 1, 2022): Solved
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot-android#14
No description provided.