0

I got my audio app working nicely with Android Auto. Now I read that Google wants the audio to pause when users connect their phones to their cars.

I searched the docs for this, but did not find any clue how to detect this situation:

My stream is playing and AA connects to my media browser service. There should be an event. What is it (a callback? a broadcast?) and how can I distinguish between "connect" and "disconnect"?

My issue is, that onGetRoot() is getting called several times and I don't want the audio to stop each time this happens.

I want to stop playback whenever a "connect" or "disconnect" event occurs.

Has anyone any suggestions here?

Anticro
  • 685
  • 4
  • 12
  • Have you resolve this issue? – Azay Gupta Mar 08 '22 at 05:13
  • 1
    Nope. I still don't have a clue about how to detect client connections/disconnections. `onGetRoot()` is getting called by the system without any obvious reason (no client app starts). – Anticro Mar 09 '22 at 07:52

0 Answers0