OpenSageTV / sagetv-miniclient

SageTV MiniClient for Android TV (and phone/tablet)
http://forums.sagetv.com/forums/showthread.php?t=62439
Apache License 2.0
19 stars 14 forks source link

Play/pause button seems to trigger audio apps in background if they're in memory #74

Closed DarkWolf7 closed 6 years ago

DarkWolf7 commented 7 years ago

So I hadn't used Google Play Music on the Shield TV before, but I did the other day, and ever since then when I press play on a recording in the Sage miniclient, Google decides that it needs to start blasting music at the same time. To be clear - I'm using the harmony remote with the native shield remote support, and not an ir blaster. This is pretty obnoxious because the only way to make the music stop is to exit sage entirely, go to the music app and stop it there. Now, I've noticed that it doesn't do that when I'm in other apps like Netflix or Hulu for example.

In further testing, I also found that in other apps, if music is playing and you start watching video the music stops, however in the sage miniclient, it keeps playing. I am guessing there's some 'video playing' broadcast event that is broadcast by other players but the miniclient isn't.

Unfortunately, the only work around I've found to keep this from happening is to disable the Google Play Music app entirely, but it's only a partial work around - if I had been listening to Pandora recently and it's still in memory, it will also do the same thing.

To replicate the issue easily, I tested it out, and I found that the behavior is easily replicated via this remote control app for android: Remote Android TV: https://play.google.com/store/apps/details?id=fr.bouyguestelecom.remote&hl=en

Using the play/pause button on the main screen of that app will also do the same thing - SageTV video starts playing and google music will start playing at the same time - but only on the miniclient (so far, anyway).

stuckless commented 7 years ago

Thanks, I'll check this out.

On Fri, Jul 14, 2017 at 10:35 AM DarkWolf7 notifications@github.com wrote:

So I hadn't used Google Play Music on the Shield TV before, but I did the other day, and ever since then when I press play on a recording in the Sage miniclient, Google decides that it needs to start blasting music at the same time. To be clear - I'm using the harmony remote with the native shield remote support, and not an ir blaster. This is pretty obnoxious because the only way to make the music stop is to exit sage entirely, go to the music app and stop it there. Now, I've noticed that it doesn't do that when I'm in other apps like Netflix or Hulu for example.

In further testing, I also found that in other apps, if music is playing and you start watching video the music stops, however in the sage miniclient, it keeps playing. I am guessing there's some 'video playing' broadcast event that is broadcast by other players but the miniclient isn't.

Unfortunately, the only work around I've found to keep this from happening is to disable the Google Play Music app entirely, but it's only a partial work around - if I had been listening to Pandora recently and it's still in memory, it will also do the same thing.

To replicate the issue easily, I tested it out, and I found that the behavior is easily replicated via this remote control app for android: Remote Android TV: https://play.google.com/store/apps/details?id=fr.bouyguestelecom.remote&hl=en

Using the play/pause button on the main screen of that app will also do the same thing - SageTV video starts playing and google music will start playing at the same time - but only on the miniclient (so far, anyway).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenSageTV/sagetv-miniclient/issues/74, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAfKZ226z4Mysfa-zi940uNLQr-LfxEks5sN3zHgaJpZM4OYVOW .

--

Sent from Android

stuckless commented 6 years ago

I might need to request audio focus to steal it away. This is a reference on how to do that.

https://stackoverflow.com/a/16252044/614231

stuckless commented 6 years ago

Turns out this needed some extra work on capturing the broadcast receiver intent for this. This is fixed in 1.2.12.