Thursday, October 22, 2009

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,


No comments:

Post a Comment

Androidians