brought here is the code for making a phone call from my Activity
public void makeAPhoneCallWithSpeakerOn()
{
String uri = "tel:" + posted_by.trim() ;
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(uri));
startActivity(intent);
}
question is:
how can I make the phone call and turn the speaker on?
10X Elad
Use an AudioManager to turn on the speakers and a CallStateListener for receiving the end of the call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With