0

I'm trying to set the speaker on automatically during a phone call on my asus fonepad7 but the it seems that I'm not allowed to dot it. I'm using the code below.

audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.setMode(audioManager.MODE_IN_COMMUNICATION);
audioManager.setSpeakerphoneOn(true);

give me in the Log

W/AudioManager﹕ setMode():Only phone app can set AudioMode during a phonecall!
W/AudioManager﹕ Not Allow setSpeakerphonOn!!!

The previous code works well on my Galaxy s3, so I think I have issue due to the fact I'm using a tablet instead of a phone. I was wondering if there's anyway to fix this (rooting the tablet and taking a specific rom ??)

Any advice or lead to fix this would be really appreciated !

IvannMG
  • 41
  • 4

1 Answers1

0

Could you try to set the MODE_IN_CALL just before setSpeakerPhoneOn ?

Mattt1438
  • 101
  • 1
  • 7
  • Already tried that, same result sadly :/ It's really annoying that you can't use that method on that device.. – IvannMG May 17 '15 at 19:40
  • Ok :-(. you could try this solution http://stackoverflow.com/a/30049718/4850790 It works for me but I'm not in communication.... – Mattt1438 May 18 '15 at 07:19