i'm having an app that is using the phone speaker, to play audio normally.
I'm having a button that once pressed will pass the audio to the phone as in call / BT headset if it's connected.
but no matter what i do i can't get the audio to move to my headset. here is what i do in case of a press on the move to phone button.
mAudioManager.setMode(AudioManager.MODE_IN_CALL);
mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, mVolume, 0);
mAudioManager.setSpeakerphoneOn(false);
in addition i made sure i have the
Modify_Audio_Settings
permission
I only managed to get the call moved to the Phone Itself. and i can hear the audio as in a phone call
but i can't hear it in my BT Headphones that are connected to my phone
what am i doing wrong?
p.s. i noticed a similar question : Android - Getting audio to play through earpiece
but it's not my case 1-1 and i looked into the solutions there it's the same what i'm doing.
what am i doing wrong an how can i fix it ?