Hi All,

While driving, if I receive an incoming call the car radio is
automatically muted and the incoming call is routed through to my car
radio.  All other applications require me to switch the radio mode to
"Bluetooth Audio".

I'm curious if there is a way to simulate the default incoming call
functionality.  Specifically, I'd like to be able to have my
application interrupt, mute the radio, route it's audio through, then
when complete unmute the radio (the same as an incoming call does when
your car is setup with a mute wire).   The app works as expected other
than I can't hear any output unless the car is set to "bluetooth
audio" manually.

I haven't found much on the subject in my searches around the topic.
So far I've played with variations of following and had no luck:

AudioManager audioMan = (AudioManager)
getSystemService(Context.AUDIO_SERVICE);
audioMan.setStreamSolo(AudioManager.STREAM_VOICE_CALL, true);
audioMan.setBluetoothScoOn(true);
audioMan.setMode(AudioManager.MODE_IN_CALL);
ttsEngine.speak("Hello World", TextToSpeech.QUEUE_FLUSH, null);
audioMan.setStreamSolo(AudioManager.STREAM_VOICE_CALL, false);
audioMan.setMode(AudioManager.MODE_NORMAL);
audioMan.setBluetoothScoOn(false);

I've also included the following in the manifest file:

<uses-permission
android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-
permission>

Honestly, I'm not even sure if I'm even close to being on the right
track since all my attempts have resulted in code that doesn't break
anything but gets me no closer to the goal.

Any assistance here would be much appreciated.

thanks,
steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to