//The following is the URI of the commonly used intent and its examples, including the common intent used in most applications. 002 003//First, open a Web page, the category is Intent.action_view004 005 URI uri = Uri.parse ("http://blog.3gstdy.com/"); 006 007 Intent Intent =NewIntent (Intent.action_view, URI); 008//Open the map and navigate to a point009 010 URI uri = uri.parse ("geo:52.76,-79.0342″); 011 012 Intent Intent =NewIntent (Intent.action_view, URI); 013 014//Third, open the dial-up interface, type is intent.action_dial015 016 URI uri = uri.parse ("tel:10086″); 017 018 Intent Intent =NewIntent (intent.action_dial, URI); 019 020//four, direct calls, and three different is that this direct call, rather than open the dial-up interface021 022 uri uri = Uri.parse ("tel:10086″); 023 024 Intent Intent =NewIntent (Intent.action_call, URI); 025 026//Five, uninstall an application, the category of intent is Intent.action_delete027 028 uri uri = Uri.fromparts (" Package"," xxx ",NULL); 029 030 Intent Intent =NewIntent (Intent.action_delete, URI); 031 032//Six, install the application, Intent category is intent.action_package_added033 034 uri uri = Uri.fromparts (" Package"," xxx ",NULL); 035 036 Intent Intent =NewIntent (intent.action_package_added, URI); 037 038//Seven, play audio files039 040 uri uri = Uri.parse ("File:///sdcard/download/everything.mp3″); 041 042 Intent Intent =NewIntent (Intent.action_view, URI); 043 044 intent.settype ("audio/Mp3″); 045 046//Eight, open the outgoing mail interface047 048 Uri uri=uri.parse ("Mailto:[email protected]"); 049 050 Intent Intent =NewIntent (Intent.action_sendto, URI); 051 052//Nine, e-mail, and eight different here is to send the mail out,053 054 Intent Intent =NewIntent (intent.action_send); 055 056 string[] tos ={"[Email protected]"}; 057 058 string[] CCS ={"[Email protected]"}; 059 060Intent.putextra (Intent.extra_email, TOS); 061 062Intent.putextra (INTENT.EXTRA_CC, CCS); 063 064 Intent.putextra (Intent.extra_text, "I come from http://blog.3gstdy.com "); 065 066 Intent.putextra (intent.extra_subject, "http://blog.3gstdy.com "); Intent.settype (" Message/rfc882″ "); 067 068Intent.createchooser (Intent, "Choose Email Client"); 069 070//send a message with an attachment071 072 Intent Intent =NewIntent (intent.action_send); 073 074Intent.putextra (Intent.extra_subject, "The email SUBJECT text"); 075 076 Intent.putextra (intent.extra_stream, "file:///sdcard/mysong.mp3″); 077 078 intent.settype ("audio/Mp3″); 079 080startactivity (Intent.createchooser (Intent, "Choose Email Client")); 081 082//10. Send SMS083 084 Uri uri= uri.parse ("tel:10086″); 085 086 Intent Intent =NewIntent (Intent.action_view, URI); 087 088 Intent.putextra ("Sms_body", "I come from http://blog.3gstdy.com "); 089 090 Intent.settype ("VND. android-dir/mms-SMS "); 091 092//11. Send email directly093 094 Uri uri= uri.parse ("Smsto://100861″); 095 096 Intent Intent =NewIntent (Intent.action_sendto, URI); 097 098 Intent.putextra ("Sms_body", "3g Android http://blog.3gstdy.com "); 099 100//12, send MMS101 102 Uri uri= Uri.parse ("content://Media/external/images/media/23″); 103 104 Intent Intent =NewIntent (intent.action_send); 106 Intent.putextra ("Sms_body", "3g Android http://blog.3gstdy.com "); 107 108Intent.putextra (Intent.extra_stream, URI); 109 Intent.settype ("image/png "); 111 112//13. # Market Related113 114//1//Find an appThe URI uri = Uri.parse ("Market://search?q=pname:pkg_name "); 117 118 Intent It =NewIntent (Intent.action_view, URI); 119 120startactivity (IT); 121 122//where Pkg_name is the full package path for an application123 124//2//Show information about an app126 URI uri = Uri.parse ("Market://details?id=app_id "); 127 Intent It =NewIntent (Intent.action_view, URI); 129 130startactivity (IT); 131 132//where app_id is the application ID, find the ID133 134//By clicking on your application in market home135 136//page, and notice the ID from the address bar137 138//14. Path Planning139 the URI uri = Uri.parse ("http://maps.google.com/maps?f=d&saddr=startlat%20startlng&daddr=endlat%20endlng&hl=en "); 141 142 Intent It =NewIntent (Intent.action_view, URI); 143 144 startactivity (IT);
Wirelessly a code that solves dialing, positioning, Web, uninstall, install, play, mail, SMS