Java code
// Display the webpage
Uri uri = Uri. parse ("http://google.com ");
Intent it = new Intent (Intent. ACTION_VIEW, uri );
// Display the map
Uri uri = Uri. parse ("geo: 38.899533,-77.036476 ");
Intent it = new Intent (Intent. ACTION_VIEW, uri );
// Other geo URI examples
// Geo: latitude, longpolling
// Geo: latitude, longpolling? Z = zoom
// Geo: 0, 0? Q = my + street + address
// Geo: 0, 0? Q = business + near + city
// Google. streetview: cbll = lat, lng & white = 1, yaw, pitch, zoom & mz = mapZoom
// Route Planning
Uriuri = Uri. parse ("http://maps.google.com/maps? F = d & saddr = startLat % 20 startLng & daddr = endLat % 20 endLng & hl = en ");
Intentit = new Intent (Intent. ACTION_VIEW, uri );
// Where startLat, startLng, endLat, endLng are a long with 6 decimals like: 50.123456
// Call
// Call the dialing program
Uri uri = Uri. parse ("tel: 0800000123 ");
Intent it = new Intent (Intent. ACTION_DIAL, uri );
// Directly call out
Uri uri = Uri. parse ("tel: 0800000123 ");
Intent it = new Intent (Intent. ACTION_CALL, uri );
// Add <uses-permission id = "android. permission. CALL_PHONE"/> to AndroidManifest. xml.
Send SMS/MMS
// Call the SMS Program
Intentit = new Intent (Intent. ACTION_VIEW, uri );
It. putExtra ("sms_body", "The SMS text ");
It. setType ("vnd. android-dir/mms-sms ");
// Send messages
Uri uri = Uri. parse ("smsto: // 0800000123 ");
Intent it = new Intent (Intent. ACTION_SENDTO, uri );
It. putExtra ("sms_body", "The SMS text ");
// Send MMS
Uri uri = Uri. parse ("content: // media/external/images/media/23 ");
Intent it = new Intent (Intent. ACTION_SEND );
It. putExtra ("sms_body", "some text ");
It. putExtra (Intent. EXTRA_STREAM, uri );
It. setType ("image/png ");
// Send Email
Uri uri = Uri. parse ("mailto: xxx@abc.com ");
Intent it = new Intent (Intent. ACTION_SENDTO, uri );
Intent it = new Intent (Intent. ACTION_SEND );
It. putExtra (Intent. EXTRA_EMAIL, "me@abc.com ");
It. putExtra (Intent. EXTRA_TEXT, "The email body text ");
It. setType ("text/plain ");
StartActivity (Intent. createChooser (it, "Choose Email Client "));
Intent it = new Intent (Intent. ACTION_SEND );
String [] tos = {"me@abc.com "};
String [] ccs = {"you@abc.com "};
It. putExtra (Intent. EXTRA_EMAIL, tos );
It. putExtra (Intent. EXTRA_CC, ccs );
It. putExtra (Intent. EXTRA_TEXT, "The email body text ");
It. putExtra (Intent. EXTRA_SUBJECT, "The email subject text ");
It. setType ("message/rfc822 ");
StartActivity (Intent. createChooser (it, "Choose Email Client "));
// Transfer the attachment
Intentit = new Intent (Intent. ACTION_SEND );
It. putExtra (Intent. EXTRA_SUBJECT, "The email subject text ");
It. putExtra (Intent. EXTRA_STREAM, "file: // sdcard/mysong.mp3 ");
SendIntent. setType ("audio/mp3 ");
StartActivity (Intent. createChooser (it, "Choose Email Client "));
// Play multimedia
Uri uri = Uri. parse ("file: // sdcard/song.mp3 ");
Intent it = new Intent (Intent. ACTION_VIEW, uri );
It. setType ("audio/mp3 ");
StartActivity (it );
Uri uri = Uri. withAppendedPath (MediaStore. Audio. Media. INTERNAL_CONTENT_URI, "1 ");
Intent it = new Intent (Intent. ACTION_VIEW, uri );
// Related to Market
// Search for an application
Uri uri = Uri. parse ("market: // search? Q = pname: pkg_name ");
Intent it = new Intent (Intent. ACTION_VIEW, uri );
StartActivity (it );
// Where pkg_name is the full package path for an application
// Display information about an application
Uri uri = Uri. parse ("market: // details? Id = app_id ");
Intent it = new Intent (Intent. ACTION_VIEW, uri );
StartActivity (it );
// Where app_id is the application ID, find the ID
// By clicking on your application on Market home
// Page, and notice the ID from the address bar
// Uninstall the application
Uri uri = Uri. fromParts ("package", strPackageName, null );
Intent it = new Intent (Intent. ACTION_DELETE, uri );
This article is from sunney2012"