PlaybackTools

Provider for the playback tools: GetNowPlayingTool and MediaControlTool.

Both tools read/control media sessions through the system, which requires Notification Listener access. The host app must register its listener ComponentName via NotificationListenerHolder and have the listener enabled in Settings; use permissionStatus to check and prompt for that access.

Functions

Link copied to clipboard
fun all(context: Context): List<McpTool>

Instantiates all playback tools bound to context.

Link copied to clipboard

Always true; there are no runtime permissions to check (see permissionStatus).

Link copied to clipboard

Returns whether the host's registered notification listener (from NotificationListenerHolder) is actually enabled in system Settings.

Link copied to clipboard

Reports notification-listener access as a PermissionStatus; when not granted, carries an intent to the notification-access Settings screen.

Link copied to clipboard

No runtime permissions: Notification Listener access is a special access granted via Settings, not a runtime permission.

Link copied to clipboard

The names of all playback tools provided by this module.