I\'m using Glide for all loading images from server, but I\'m having troubleshooting trying to set them in a correct way to notifications and RemoteControlClientCompat (that coo
You need to set use NotificationTarget class to set your notification image as glide target
NotificationTarget notificationTarget = new NotificationTarget(
context,
remoteView,
R.id.iv_album_art,
notification,
NOTIFICATION_ID);
and then use that target in usual glide way
Uri uri = ContentUris.withAppendedId(PlayerConstants.sArtworkUri,
mediaitem.getAlbumId());
Glide.with(getApplicationContext())
.load(uri)
.asBitmap()
.into( notificationTarget );
It is explained in Glide's guideline here
https://futurestud.io/blog/glide-loading-images-into-notifications-and-appwidgets
You might also like to animate album art change- Its described here:-
https://futurestud.io/blog/glide-custom-animations-with-animate