I'm trying to listen for changes to the active media sessions on my Android TV (specifically to set my Hue lights into a sort of "movie mode"). On a normal Android device (4.3+) I'd set up a NotificationListenerService
to allow me to call MediaSessionManager.addOnActiveSessionsChangedListener()
.
The problem is that Android TV doesn't seem to have a UI to enable my NotificationListenerService
, and there is nothing to handle Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS
. Does anyone know of another approach to listen for media changes or a way to enable a NotificationListenerService
on Android TV? This is just for my own use, so this doesn't need to be a scalable solution (adb is fine).
From an ADB shell:
By default on my TV, this returns com.google.android.leanbacklauncher/.notifications.NotificationMonitorService.