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-PermissionId = "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-PermissionId = "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.