NotificationTarget
This class is used to display downloaded Bitmap inside an ImageView of a Notification through RemoteViews.
Note - For cancellation to work correctly, you must pass in the same instance of this class for every subsequent load.
Constructors
Link copied to clipboard
open fun NotificationTarget( context: Context, viewId: Int, remoteViews: RemoteViews, notification: Notification, notificationId: Int)
Content copied to clipboard
Constructor using a Notification object and a notificationId to get a handle on the Notification in order to update it that uses SIZE_ORIGINAL as the target width and height.
Link copied to clipboard
open fun NotificationTarget( context: Context, viewId: Int, remoteViews: RemoteViews, notification: Notification, notificationId: Int, notificationTag: String)
Content copied to clipboard
Constructor using a Notification object, a notificationId, and a notificationTag to get a handle on the Notification in order to update it that uses SIZE_ORIGINAL as the target width and height.
Link copied to clipboard
open fun NotificationTarget( context: Context, width: Int, height: Int, viewId: Int, remoteViews: RemoteViews, notification: Notification, notificationId: Int, notificationTag: String)
Content copied to clipboard
Constructor using a Notification object, a notificationId, and a notificationTag to get a handle on the Notification in order to update it.
Functions
Link copied to clipboard
A method to retrieve the size of this target.
Link copied to clipboard
A mandatory lifecycle callback that is called when a load is cancelled and its resources are freed.
Link copied to clipboard
A mandatory lifecycle callback that is called when a load fails.
Link copied to clipboard
A lifecycle callback that is called when a load is started.
Link copied to clipboard
open fun onResourceReady(resource: Bitmap, transition: Transition<out Any>)
Content copied to clipboard
The method that will be called when the resource load has finished.
Link copied to clipboard
Removes the given callback from the pending set if it's still retained.