Wednesday, 7 October 2015

How to make a Phone call from Android activity



    Here I am going to explain how to make phone call from android activity


 Step 1)Add the below permission in your manifest file

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


Step 2)Add the below code to activity


       Intent callIntent = new Intent(Intent.ACTION_CALL);
       callIntent .setData(Uri.parse("tel:+91-XXXXXXXXX"));
       startActivity(callIntent );


Happy Coding:)