Pages

Sunday 11 December 2011

Make a Call in ANDROID

Here I am gonna share the make a call in android.Well i have assumed that you know some basics in android.

1Step: Give  the user permission in Manifest.xml
<user-permissions android:name="android.permission.CALL_PHONE"/>
2 Step: In your activity on create method create an instance for intent with the action of call.then parse your URI with the phone number. then start your activity. Here the code comes.

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

No comments:

Post a Comment