Can't render artwork on AAOS emulator
Version
Media3 1.5.1
More version details
I can't get artwork to render on AAOS media3 emulator. Exactly the same code that renders fine on Android Auto is producing "musical note" fallback images, We are using the artworkData field of MediaMetaData and setting a byte array there. I have checked the integrity of the bytearray. I have even injected a custom BitMapLoader based on the one in the system, only with logs, and this reports everything fine. I am using the AOSP ATD ARM 64 System Image I tried looking at your demo app but this uses embedded png images. I need to load images dynamically from the network.
Devices that reproduce the issue
AOSP ATD ARM 64 System Image
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
The problem manifests with http(s) uris assigned to the artworkUri field as well. To reproduce in the demo app you would need to find a way to insert a valid http(s):/ instead of the content:/ uri that points to the fixed assets in the metadata. For example: https://fastly.picsum.photos/id/944/50/50.jpg?hmac=9cgNtSzBtm9bkeyK8axolhjzlRtJQwoxbr6t53orjqs
Regrettably, I was unable to figure out how to do that. Had the underlying code for MediaItem been a Kotlin data class, this would have been a simple map and copy inside onGetChildren.....
Expected result
Actual result
Media
n/a
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
Hi @mylesbennett-global,
Thank you for your report. We actually get this question quite often and the bottom line is: media3 doesn't handle the artworkUri field on the AAOS side - we are only involved in plumbing it between your app and AAOS.
Also, you might be having a trouble because of using the http(s):// scheme URIs. They are often not accepted, ancan you try using a content:// URI instead?
See related links:
- https://developer.android.com/reference/android/media/MediaMetadata#METADATA_KEY_ALBUM_ART_URI
- https://developer.android.com/training/cars/media#display-artwork
Hey @mylesbennett-global. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@mylesbennett-global if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.