Tips for using the android call Platform

Source: Internet
Author: User

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

 
 
  1. Uri uri = Uri.parse("http://google.com");   
  2. Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  3. startActivity(it);   
  4. Uri uri = Uri.parse("http://google.com");   
  5. Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  6. startActivity(it);  

Display map of Android calling platform Functions

 
 
  1. Uri uri = URI. parse ("Geo: 38.899533,-77.036476 ");
  2. Intent it = new intent (intent. action_view, Uri );
  3. Startactivity (it );
  4. // Other geo uri examples
  5. // GEO: latitude, longpolling
  6. // GEO: latitude, longpolling? Z = zoom
  7. // GEO: 0, 0? Q = My + street + address
  8. // GEO: 0, 0? Q = business + near + city
  9. // Google. Streetview: cbll = Lat, LNG & white = 1, yaw, pitch,
    Zoom & MZ = mapzoom
  10. Uri uri = URI. parse ("Geo: 38.899533,-77.036476 ");
  11. Intent it = new intent (intent. action_view, Uri );
  12. Startactivity (it );
  13. // Other geo uri examples
  14. // GEO: latitude, longpolling
  15. // GEO: latitude, longpolling? Z = zoom
  16. // GEO: 0, 0? Q = My + street + address
  17. // GEO: 0, 0? Q = business + near + city
  18. // Google. Streetview: cbll = Lat, LNG & white = 1, yaw, pitch,
    Zoom & MZ = mapzoom

Call number for Android call platform function

 
 
  1. // Call the program
  2. Uri uri = URI. parse ("Tel: 0800000123 ");
  3. Intent it = new intent (intent. action_dial, Uri );
  4. Startactivity (it );
  5. // Directly call
  6. Uri uri = URI. parse ("Tel: 0800000123 ");
  7. Intent it = new intent (intent. action_call, Uri );
  8. Startactivity (it );
  9. // Add this parameter to androidmanifest. xml
  10. // <Uses-PermissionId = "android. Permission. call_phone"/>
  11. // Call the program
  12. Uri uri = URI. parse ("Tel: 0800000123 ");
  13. Intent it = new intent (intent. action_dial, Uri );
  14. Startactivity (it );
  15. // Directly call
  16. Uri uri = URI. parse ("Tel: 0800000123 ");
  17. Intent it = new intent (intent. action_call, Uri );
  18. Startactivity (it );
  19. // Add this parameter to androidmanifest. xml
  20. // <Uses-PermissionId = "android. Permission. call_phone"/>

Android call platform function-sending SMS/MMS

 
 
  1. // Enter the SMS number.
  2. Intent it = new intent (intent. action_view );
  3. It. putextra ("sms_body", "the SMS text ");
  4. It. settype ("Vnd. Android-DIR/MMS-SMS ");
  5. Startactivity (it );
  6. // Send SMS
  7. Uri uri = URI. parse ("smsto: 0800000123 ");
  8. Intent it = new intent (intent. action_sendto, Uri );
  9. It. putextra ("sms_body", "the SMS text ");
  10. Startactivity (it );
  11. // Send MMS
  12. Uri uri = URI. parse ("content: // media/external
    /Images/Media/23 ");
  13. Intent it = new intent (intent. action_send );
  14. It. putextra ("sms_body", "some text ");
  15. It. putextra (intent. extra_stream, Uri );
  16. It. settype ("image/PNG ");
  17. Startactivity (it );
  18. // Enter the SMS number.
  19. Intent it = new intent (intent. action_view );
  20. It. putextra ("sms_body", "the SMS text ");
  21. It. settype ("Vnd. Android-DIR/MMS-SMS ");
  22. Startactivity (it );
  23. // Send SMS
  24. Uri uri = URI. parse ("smsto: 0800000123 ");
  25. Intent it = new intent (intent. action_sendto, Uri );
  26. It. putextra ("sms_body", "the SMS text ");
  27. Startactivity (it );
  28. // Send MMS
  29. Uri uri = URI. parse ("content: // media/external/
    Images/Media/23 ");
  30. Intent it = new intent (intent. action_send );
  31. It. putextra ("sms_body", "some text ");
  32. It. putextra (intent. extra_stream, Uri );
  33. It. settype ("image/PNG ");
  34. Startactivity (it );

This section describes the functions of the android calling platform.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.