Several uses of Android permissions Uri.parse (reprint)

Source: Internet
Author: User

1, tune the Web browser
Uri Mybloguri = Uri.parse ("http://xxxxx.com");
Returnit = new Intent (Intent.action_view, Mybloguri);
2, Map
Uri Mapuri = Uri.parse ("geo:38.899533,-77.036476");
Returnit = new Intent (Intent.action_view, Mapuri);
3, transfer the phone interface
Uri Teluri = Uri.parse ("tel:100861");
Returnit = new Intent (intent.action_dial, Teluri);
4, call directly
Uri Calluri = Uri.parse ("tel:100861");
Returnit = new Intent (Intent.action_call, Calluri);
5, uninstall
Uri Uninstalluri = uri.fromparts ("package", "XXX", null);
Returnit = new Intent (Intent.action_delete, Uninstalluri);
6, installation
Uri Installuri = uri.fromparts ("package", "XXX", null);
Returnit = new Intent (intent.action_package_added, Installuri);
7, play
Uri Playuri = Uri.parse ("File:///sdcard/download/everything.mp3");
Returnit = new Intent (Intent.action_view, Playuri);
8, call Send Message
Uri Emailuri = Uri.parse ("Mailto:[email protected]");
Returnit = new Intent (intent.action_sendto, Emailuri);
9, send e-mail
Returnit = new Intent (intent.action_send);
String[] tos = {"[Email protected]"};
String[] CCS = {"[Email protected]"};
Returnit.putextra (Intent.extra_email, TOS);
Returnit.putextra (INTENT.EXTRA_CC, CCS);
Returnit.putextra (Intent.extra_text, "body");
Returnit.putextra (Intent.extra_subject, "SUBJECT");
Returnit.settype ("message/rfc882");
Intent.createchooser (Returnit, "Choose Email Client");
10, send SMS
Uri Smsuri = Uri.parse ("tel:100861");
Returnit = new Intent (Intent.action_view, Smsuri);
Returnit.putextra ("Sms_body", "yyyy");
Returnit.settype ("vnd.android-dir/mms-sms");
11, send mail directly
Uri Smstouri = Uri.parse ("smsto://100861");
Returnit = new Intent (intent.action_sendto, Smstouri);
Returnit.putextra ("Sms_body", "yyyy");
12, send MMS
Uri Mmsuri = Uri.parse ("Content://media/external/images/media/23");
Returnit = new Intent (intent.action_send);
Returnit.putextra ("Sms_body", "yyyy");
Returnit.putextra (Intent.extra_stream, Mmsuri);
Returnit.settype ("Image/png");

http://274137570-qq-com.iteye.com/blog/1517168

Several uses of Android permissions Uri.parse (reprint)

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.