How to make a phone call in Android Application

Standard

You can use this code for making a phone call in your application:

String number = "tel:" + phoneNumber;
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(number));
startActivity(callIntent);

also you have to add this permission to your application manifest file:

<uses-permission android:name="android.permission.CALL_PHONE" />

Leave a Reply

Your email address will not be published. Required fields are marked *