How to Make a Phone Call in Android by Entering any Number

In this tutorial, you will learn how to make a phone call in android by entering any number in the EditText. You can easily make a phone call in android. To make a phone call in android, you just need to write little bit code in your activity file.

Get Current Time in Android Programmatically
How to Increase the Integer Value When Screen is Touched
How to Rotate a Line in Android

Android Phone Call Example by Entering any Number

Add Permission Code in your AndroidManifest.xml File
The phone call permission code will like this:
<uses-permission android:name="android.permission.CALL_PHONE">
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission></uses-permission>

AndroidManifest.xml File

XML Layout File
Add a button and edit text in your xml layout file, your phone_call.xml file will like this.

Java Activity File
Add the following code in your java activity file to make phone call.

Strings Resource File

Now, run your application and enter any phone number and click the CLICK TO CALL button which will look like the output given below.


How to Make a Phone Call in Android by Entering any Number

Phone Calling in Android by Entering any Number

Tutorial 1023239430484100292
Home item