Routing Audio data to Both HEADSET and SPEAKER.

by Anand » Thu, 22 Apr 2010 19:43:18 GMT

Sponsored Links

As particular need, I want to route the Audio data to both HEADSET and
SPEAKER. For example if I play a Music file, I want that the output
should come on speaker and on headset as well. My first question is
weather is it possible or not in the current clair SDK.

As per my understanding, the Headset plugging/unplugging is detected
by the kernel switch driver and the event is sent to Then broadcasts the intent
Intent.ACTION_HEADSET_PLUG with information about state as plugged/
unplugged. This intent is received by and the
audiomanager/audioFlinger is informed to turn on/off the speaker. The
audioManager/AudioFlinger further passes the information to (AudioHardware.cpp). Then in the end the information is
passed to kernel to switch between the speakerphone and Headset.

I have found a case in AudioHardware.cpp as

That being said, please tells me how I can enable both the Headset and
Speakerphone. Incase required, I can furnish more investigation, what
I have done so far.



Other Threads

1. suggestion about time interval selection

On the time selection GUI element it would be nice to hold the up or
down arrow for the minutes and instead of it going one digit at a
time, it would follow the following behavior:

Digits 1 thru 9 would be one at a time, when 10 was reached a
vibration feedback event would happen and then it would go by 5's or
10's. If you wanted 43, you would hold the button until 40 was reached
then lift your finger, and tap the up arrow 3 more times to reach 43.


2. Location problem


i am new to android and not being able to display current location on
map so can you provide me the code for
displaying Location with manifest.xml and main.xml...

please reply fast!!!!!
it nis urgent!!!!


3. ScrollView question

4. launching picasa from my app

5. Can't achieve focus under cascading framelayouts!

6. LocationListener sometimes not receiving updates from "network" provider

7. Unit Testing - Activity shutdown