1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

Disable headphones, leave microphone enabled


Last Updated:

  1. Zinefer

    Zinefer New Member This Topic's Starter

    Joined:
    Apr 6, 2011
    Messages:
    1
    Likes Received:
    0
    I have a broken HTC Hero. The built in microphone does not work.

    I can get around this problem using the headset jack and plugging in a microphone.

    However this routes the sound to the headphones. I have tried modifying ToggleHeadset2...
    Code (Text):
    1. //setDeviceConnectionState(DEVICE_IN_WIRED_HEADSET, DEVICE_STATE_UNAVAILABLE, "");
    2. setDeviceConnectionState(DEVICE_OUT_WIRED_HEADSET, DEVICE_STATE_UNAVAILABLE, "");
    3. setDeviceConnectionState(DEVICE_OUT_EARPIECE, DEVICE_STATE_AVAILABLE, "");
    I thought commenting that line would leave the microphone enabled. This however seems not to be the case.

    If anyone could send some code my way that would get this done quick and dirty like I'd be eternally grateful.

    Thanks!
     

    Advertisement

Share This Page

Loading...