/ Published in: Java
URL: http://www.lacherstorfer.at/haris_blog/2008/03/android-howto-invoke-a-phone-c.html
a 2-lines code to start a phone call from your Android application
Expand |
Embed | Plain Text
try { Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:+123456")); startActivity(intent); Log.e("SampleApp", "Failed to invoke call", e); }
Comments
Subscribe to comments
You need to login to post a comment.

You must add call permission tag in the AndroidManifest.xml file :
put
after
You must add call permission tag in the AndroidManifest.xml file :
put
after
uses-permission android:name="android.permission.CALL_PHONE" tag