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 this tutorial, you will learn phone call by entering number in code.

Get Current Time in Android Programmatically
How to Increase and Decrease the Integer Value When the Button is Clicked

Android Example: How to Make a Phone Call in Android

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 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 click the Call To button which will look like the output given below.


How to Make a Phone Call in Android

Phone Calling in Android

Post a Comment

Powered by Blogger.