For your app, you could need to start a phone call from it. Android API offers two methods (at least) to achieve that.
The first approach doesn’t require any specific permission but, it doesn’t really start the call. Instead, it displays the number to call to the user which could start it or not.
Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(Uri.fromParts("tel", phoneNumber, null)); startActivity(intent);
When you want to prepend the phone number with some special chars sequence (here with #31# prefix)
Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(Uri.fromParts("tel", "#31# + phoneNumber, null)); startActivity(intent);
The 2nd method is straitful : the call starts, but your app requires permission
Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.fromParts("tel", phoneNumber, null)); startActivity(intent);
and do not forget to add the permissin in the manisfest:
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
For practical use, the 1st way is the right one as NO permission is required, so it’s a little bit less intrusive and less dangerous (for user’s billing).