Routing Audio data to Both HEADSET and SPEAKER.

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


Sponsored Links
 Hi,

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
HeadsetObserver.java. Then HeadsetObserver.java broadcasts the intent
Intent.ACTION_HEADSET_PLUG with information about state as plugged/
unplugged. This intent is received by PhoneApps.java and the
audiomanager/audioFlinger is informed to turn on/off the speaker. The
audioManager/AudioFlinger further passes the information to
Libaudio.so (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
SND_DEVICE_HEADSET_AND_SPEAKER.

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.

Thanks
Anand

--



Other Threads

1. Configuring APN's PAP authenticat ion / Habilitando la autenticacič´¸n PAP para mi APN

Buenos das.

Tengo la HTC Magic (con Android 1.5).
Para mi trabajo necesito configurar una APN que tenga autenticacin
PAP, adems necesito configurar mi propia IP y DNS.
Veo que es imposible hacerlo con mi versin actual. Mi pregunta es:
cambiar esto en prximas versiones? Hay alguna aplicacin de
terceros que lo haga?

Muchas gracias.

-----------------

Good morning.

I'm not able to configure my HTC Magic (with Android 1.5) to make PAP
authentication (in APN settings).
In order to use my work's provider I would also need to configure my
IP and DNS (which are provided to me).

My question is: will it change in future versions? Is there any third
party app to make it?

Thank you very much.

--~--~---------~--~----~------------~-------~--~----~

2. Notepad tutorial improvements

Hi,
I've been doing the notepad tutorial @
 http://www.***.com/ 

1)
I've added a char counter on top of the body doing this:
note_edit.xml =>  http://www.***.com/ 
NoteEdit.java =>  http://www.***.com/ 

Questions with this:
- Are there any adapters like swing in android. I just use one method
from Tex{*filter*}cher and need to override all of them.
- When testing my code mChars.setTextColor(Color.WHITE) on line 92
turns my text bold. Other colors don't do this. Bug?

2)
If I add notes without title, then I can't select them from the list
to delete them.
Which would be the best way to fix this?

Thanks for reading!

--~--~---------~--~----~------------~-------~--~----~

3. how can the contact be writen to SIM card?

4. livedroid: yet another Android LiveCD

5. SurfaceViews handling, Thread, and general game design

6. Limit content provider access

7. Connecting to PC using bluetooth or wifi?