1

I have already read this post and a few others but I am still not sure how to make a phone call with speaker on. Someone suggested that

before you start the call you register the listener, then activate the speakerphones. After receiving CALL_STATE_IDLE you remove the listener and deactivate the speakerphones again

but what does this mean exactly?

Here is my code -

                Intent intentCallActivity = new Intent(context, tabWidgetActivity.class);
                intentCallActivity.putExtra("number", phoneNumber);
                intentCallActivity.putExtra("speaker", true);

                intentCallActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);



                context.startActivity(intentCallActivity);

This does not work right. Sometimes, my phone's speaker does not work properly after I test this code. This might be because I am not deactivating the speakerphone. What else do I have to do?

Community
  • 1
  • 1
Ayrton Senna
  • 3,735
  • 5
  • 34
  • 52
  • What do you mean by not working properly? – Elad Gelman Feb 20 '13 at 07:39
  • @EladGelman The the audio becomes weird from the phone. Example - After I test that functionality, and later play music or something, the music sound would be very muffled (like how it gets when a phonecall is on speaker and you try to play music). I can feel the AudioManager was released or someting. Another example - After I test that code and end the call; later when I dial a new number, the speaker phone turns on automatically. – Ayrton Senna Feb 20 '13 at 17:05

0 Answers0