If an A2DP device is connected, then we forcibly route audio to the A2DP device.

So to route away from A2DP you need to disconnect the A2DP device.

There is no public API to do this right now, but you can look at
BluetoothA2dp.java.

Nick

On Fri, Jun 19, 2009 at 11:31 AM, keyboardr<[email protected]> wrote:
>
> I'm attempting to write an A2DP toggle app (that way when I'm in the
> car I can route the audio wired through my car stereo without having
> to completely disable bluetooth for calls, etc.).  Eventually I plan
> to have it detect when an external audio output is available, but for
> now I'm fine with a manual toggle.  The problem is this: I can't stop
> A2DP.  I've used both AudioManager.setBluetoothA2dpOn(boolean on) and
> AudioManager.setRouting(int mode, int route, int mask).  No matter
> what AudioManager.isBluetoothA2dpOn() always returns true, and audio
> is always routed through the headset, not the speakers.
> AudioManager.getRouting() is returning 18 when the headset is
> connected (2 for speakers plus 16 for BluetoothA2DP).  Any advice?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to