October 2018
Intermediate to advanced
464 pages
15h 17m
English
As we've seen in previous recipes, we can call the default applications simply by using an Intent. There are two Intents for phone calls:
Here's the code to set and call the Intent for using the default Phone app:
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" + number));
startActivity(intent);
Since your application is not doing the dialing and the user must press the Dial button, your app does not need any dialing permissions. The recipe that follows will show you how to place a call directly, bypassing the ...