Android How-To: Invoke a phone call Activity

| | Comments (0)
Here's the code to invoke a phone call for a given number:

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

Leave a comment

About this Entry

This page contains a single entry by Harald Lacherstorfer published on March 18, 2008 10:56 PM.

Android How-To: Create a new Contact was the previous entry in this blog.

Android How-To: Create Spinners, ListViews and Context Menues programmatically is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.