I am writing a voice application for HTC-G2 (MyTouch) phone. I am using Audiotrack class to play audio in PCM format. It works fine but audio comes out from speaker phone instead of earpiece. When I use IsSpeakerPhoneOn() to query the status of speaker, it comes out to be "off" (false).
I even tried SetSpeakerPhoneOn(true) and then SetSpeakerPhoneOn(false) to make sure that I explicitly set the speaker to off but audio still comes out of speaker. Interestingly, I checked IsSpeakerPhoneOn() after setting SetSpeakerPhoneOn(true) and that API returned False. I tried setRouting API to set ROUTE_EARPIECE but that API seems to be deprecated. Can someone please tell how to route audio to earpiece? I was under the impression that earpiece shall be the default route for audio but it does not look that way. Thanks, Puneet Goel Kineto Wireless --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---