Calling a Number

In this tutorial, I am going to explain, how to call to a number through android application. The code for that is,


Intent intent = new Intent();
intent.setAction(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:5556"));
startActivity(intent);


The code is self explanatory, nothing big in it. Then, in the Manifest file we have to give permission too.


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


The screen-shot of the program - Emulator 5554 calling emulator 5556 in this application as,


Comments

Popular posts from this blog

AlarmManager and Notification in Android

Swipe Action and ViewFlipper in Android

Open Gallery and get the selected image in appplication