Uri.parse () Usage in Android
1, tune the Web browser Uri mybloguri= Uri.parse ("http://xxxxx.com"); Returnit=NewIntent (Intent.action_view, Mybloguri);2, map Uri Mapuri= Uri.parse ("geo:38.899533,-77.036476"); Returnit=NewIntent (Intent.action_view, Mapuri);3, assign the call interface Uri Teluri= Uri.parse ("tel:100861"); Returnit=NewIntent (intent.action_dial, Teluri);4, direct dial phone Uri calluri= Uri.parse ("tel:100861"); Returnit=NewIntent (Intent.action_call, Calluri);5, unload Uri Uninstalluri= Uri.fromparts ("package", "XXX",NULL); Returnit=NewIntent (Intent.action_delete, Uninstalluri);6, install Uri Installuri= Uri.fromparts ("package", "XXX",NULL); Returnit=NewIntent (intent.action_package_added, Installuri);7, play Uri Playuri= Uri.parse ("File:///sdcard/download/everything.mp3"); Returnit=NewIntent (Intent.action_view, Playuri);8, call the Send message Uri Emailuri= Uri.parse ("Mailto:[email protected]"); Returnit=NewIntent (Intent.action_sendto, Emailuri);9, send e-mail returnit=NewIntent (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=NewIntent (Intent.action_view, Smsuri); Returnit.putextra ("Sms_body", "yyyy"); Returnit.settype ("Vnd.android-dir/mms-sms"); 11, direct email Uri Smstouri= Uri.parse ("smsto://100861"); Returnit=NewIntent (Intent.action_sendto, Smstouri); Returnit.putextra ("Sms_body", "yyyy"); 12, send MMS Uri mmsuri= Uri.parse ("CONTENT://MEDIA/EXTERNAL/IMAGES/MEDIA/23"); Returnit=NewIntent (intent.action_send); Returnit.putextra ("Sms_body", "yyyy"); Returnit.putextra (Intent.extra_stream, Mmsuri); Returnit.settype ("Image/png");
Uri.parse () Usage in Android