The Android operating system can call the mobile platform to implement some specific functions, such as webpage display and email sending. Today, I have summarized several application skills for Android calling platform functions to help you increase programming experience.
Display webpage of Android calling platform function
- Uri uri = Uri.parse("http://google.com");
- Intent it = new Intent(Intent.ACTION_VIEW, uri);
- startActivity(it);
- Uri uri = Uri.parse("http://google.com");
- Intent it = new Intent(Intent.ACTION_VIEW, uri);
- startActivity(it);
Display map of Android calling platform Functions
- Uri uri = Uri. parse ("geo: 38.899533,-77.036476 ");
- Intent it = new Intent (Intent. ACTION_VIEW, uri );
- StartActivity (it );
- // 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
- Uri uri = Uri. parse ("geo: 38.899533,-77.036476 ");
- Intent it = new Intent (Intent. ACTION_VIEW, uri );
- StartActivity (it );
- // 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
Call number for Android call platform function
- // Call the program
- Uri uri = Uri. parse ("tel: 0800000123 ");
- Intent it = new Intent (Intent. ACTION_DIAL, uri );
- StartActivity (it );
- // Directly call
- Uri uri = Uri. parse ("tel: 0800000123 ");
- Intent it = new Intent (Intent. ACTION_CALL, uri );
- StartActivity (it );
- // Add this parameter to AndroidManifest. xml
- // <Uses-permission id = "android. permission. CALL_PHONE"/>
- // Call the program
- Uri uri = Uri. parse ("tel: 0800000123 ");
- Intent it = new Intent (Intent. ACTION_DIAL, uri );
- StartActivity (it );
- // Directly call
- Uri uri = Uri. parse ("tel: 0800000123 ");
- Intent it = new Intent (Intent. ACTION_CALL, uri );
- StartActivity (it );
- // Add this parameter to AndroidManifest. xml
- // <Uses-permission id = "android. permission. CALL_PHONE"/>
Android call platform function-sending SMS/MMS
- // Enter the SMS number.
- Intent it = new Intent (Intent. ACTION_VIEW );
- It. putExtra ("sms_body", "The SMS text ");
- It. setType ("vnd. android-dir/mms-sms ");
- StartActivity (it );
- // Send SMS
- Uri uri = Uri. parse ("smsto: 0800000123 ");
- Intent it = new Intent (Intent. ACTION_SENDTO, uri );
- It. putExtra ("sms_body", "The SMS text ");
- StartActivity (it );
- // 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 ");
- StartActivity (it );
- // Enter the SMS number.
- Intent it = new Intent (Intent. ACTION_VIEW );
- It. putExtra ("sms_body", "The SMS text ");
- It. setType ("vnd. android-dir/mms-sms ");
- StartActivity (it );
- // Send SMS
- Uri uri = Uri. parse ("smsto: 0800000123 ");
- Intent it = new Intent (Intent. ACTION_SENDTO, uri );
- It. putExtra ("sms_body", "The SMS text ");
- StartActivity (it );
- // 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 ");
- StartActivity (it );
This section describes the functions of the Android calling platform.