Uri. parse usage in Android

Source: Internet
Author: User
1. Call the web browser URI myi bloguri = Uri. parse ("http://www.soqi.cc"); 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. Call interface URI teluri = Uri. parse ("Tel: 100861"); returnit = new intent (intent. action_dial, teluri); 4. call 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) URI; 6. Install URI installuri = Uri. fromparts ("package", "XXX", null); returnit = new intent (intent. action_package_added, installuri); 7. Play URI playuri = Uri. parse ("file: // sdcard/download/everythinghistory"); returnit = new intent (intent. action_view, playuri); 8, call send email URI emailuri = Uri. parse ("mailto: xxxx@gmail.com"); returnit = new intent (intent. action_sendto, emailuri new intent (intent. action_send); string [] TOS = {"xxxx@gmail.com"}; string [] CCS = {"xxxx@gmail.com"}; 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 a text message 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, directly send an email URI smstouri = Uri. parse ("smsto: // 100861"); returnit = new intent (intent. action_sendto, smstouri); returnit. putextra ("sms_body", "YYYY"); 12, send a mms uri mmsuri = Uri. parse ("content: // media: external/images/Media/23"); returnit = new intent (intent. action_send); return_it. putextra ("sms_body", "YYYY"); returnit. putextra (intent. extra_stream, mmsuri); returnit. settype ("image/PNG ");
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.