Turn ON Speaker In Incoming Call Android
I would like to turn on the speaker and set it to maximum volume. In my PhoneStateListener I'm intercepting the incoming call, and it works fine for any incoming/outgoing call. The
Solution 1:
Instaed of
incomingNumber.equals( strRegisterNumber1) || incomingNumber.equals( strRegisterNumber2)
use
incomingNumber.contains( strRegisterNumber1) || incomingNumber.contains( strRegisterNumber2)
Because the incoming number might have +
with country code or 00
with country code. So you just have to check if the incoming call's number contains the required number.
Hope it helps...
Post a Comment for "Turn ON Speaker In Incoming Call Android"