Return to Snippet

Revision: 27379
at June 4, 2010 07:21 by funkypanda


Updated Code
try {
   Intent intent = new Intent(Intent.ACTION_CALL);
   intent.setData(Uri.parse("tel:+123456"));
   startActivity(intent);
} catch (Exception e) {
   Log.e("SampleApp", "Failed to invoke call", e);
}

Revision: 27378
at June 4, 2010 07:17 by funkypanda


Initial Code
try {
   Intent intent = new Intent(Intent.CALL_ACTION);
   intent.setData(Uri.parse("tel:+123456"));
   startActivity(intent);
} catch (Exception e) {
   Log.e("SampleApp", "Failed to invoke call", e);
}

Initial URL
http://www.lacherstorfer.at/haris_blog/2008/03/android-howto-invoke-a-phone-c.html

Initial Description
a 2-lines code to start a phone call from your Android application

Initial Title
Start a phone call from Android application

Initial Tags
phone, android

Initial Language
Java