views:

81

answers:

0

Hi,

I have an HTC Hero with a major issue. It thinks that the headset/headphones are plugged in. I sent it to HTC and they said there is water damage so no fix.

I have tried toggleheadset, toggleheadset2. I've rooted my device and installed the Android 2.1 ROM. Now I found out that AudioManager.setRouting and .setWiredHeadsetOn(bool) have been deprecated and subsequently removed.

I read a post somewhere about how you can create a wrapper for the AudioSystem class as the setRouting is still available there. I as of yet have not been able to figure out how to go about doing this as the AudioSystem class is hidden in the SDK and the code makes use of native functions.

Does anybody know of a way to go about creating and implementing a wrapper for AudioSystem or of another way to disable the headset?

P.S. I've cleaned out the headset port so there is no dust or anything sending false signals to the mainboard.

Any help will be greatly appreciated.

Thanks, Tyrone