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?