muzei-api / com.google.android.apps.muzei.api.provider / MuzeiArtProvider / getCommandActions

getCommandActions

open fun getCommandActions(artwork: Artwork): List<RemoteActionCompat>

Retrieve the list of commands available for the given artwork. Each action should have an icon 24x24dp. Muzei respects the RemoteActionCompat.setShouldShowIcon to determine when to show the action as an icon (assuming there is enough space). Actions with a blank title will be ignored by Muzei.

Each action triggers a PendingIntent. This can directly open an Activity for sending the user to an external app / website or can point to a android.content.BroadcastReceiver for doing a small amount of background work.

Parameters

artwork - The associated artwork that can be used to customize the list of available commands.

Return
A List of commands that the user can trigger.