Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Q] [QUESITON] How to route audio (Not BT or A2DP) from 14 and higher API?

$
0
0
I will quickly summarize.

Samsung Galaxy S3, when I run some app with the headphones plugged and for some reason, if the app freezes or any other issue. The phone thinks that it have the headphones plugged yet. Although it's been unplugged.

I am developing an app to fix this samsung firmware problem.

AudioManager returns me "true" with the function isWiredHeadsetOn, with or without the plugged headphones. My question is that since old api of android, setRouting or setWiredHeadset are deprecated, and I don't know can I change the value of isWiredHeadsetOn to returns me false.

I don't know if I explains me well.

Code:

AudioManager manager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
manager.setMode(AudioManager.MODE_NORMAL);

This setMode don't change the wiredheadset value.

Thanks for your advices.

Viewing all articles
Browse latest Browse all 3614


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>