public static interface PlayerNotificationManager.CustomActionReceiver
|Modifier and Type||Method and Description|
Gets the actions handled by this receiver.
Gets the actions to be included in the notification given the current player state.
Called when a custom action has been received.
Map<String,androidx.core.app.NotificationCompat.Action> createCustomActions(Context context, int instanceId)
PlayerNotificationManager instances are in use at the same time, the
instanceId must be set as an intent extra with key
PlayerNotificationManager.EXTRA_INSTANCE_ID to avoid sending the action to every custom
action receiver. It's also necessary to ensure something is different about the actions. This
may be any of the
Intent attributes considered by
different request code integers when creating the
PendingIntent.getBroadcast(android.content.Context, int, android.content.Intent, int). The easiest approach is to use the
instanceId as the
Playerfor which a notification is being built.