How To Open Dialer On Phone With A Selected Number In Android
I have made an application that uses Google Places API. Once I click on a place it returns the name of the company, the address and the number to the MainActivity. When I click on
Solution 1:
Try This
Stringphone= mNumber.getText().toString();
IntentphoneIntent=newIntent(Intent.ACTION_DIAL, Uri.fromParts(
"tel", phone, null));
startActivity(phoneIntent);
Solution 2:
Try this.
Stringnumber = "494498498";
Intent intent = newIntent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" +number));
startActivity(intent);
Post a Comment for "How To Open Dialer On Phone With A Selected Number In Android"