相當一部分來自文件,希望能有朋友繼續完善此貼,以作蒐藏。
顯示網頁:
1. uri uri = uri.parse("");
2. intent it = new intent(intent.action_view,uri);
3. startactivity(it);
顯示地圖:
1. uri uri = uri.parse("geo:38.899533,-77.036476");
2. intent it = new intent(intent.action_view,uri);
3. startactivity(it);
路徑規劃:
1. uri uri = uri.parse(" startlng&daddr=endlat endlng&hl=en");
2. intent it = new intent(intent.action_view,uri);
3. startactivity(it);
呼叫撥號程式
1. uri uri = uri.parse("tel:******");
2. intent it = new intent(intent.action_dial, uri);
3. startactivity(it);
1. uri uri = uri.parse("tel.******");
2. intent it =new intent(intent.action_call,uri);
3. 要使用這個必須在配置檔案中加入
傳送sms/mms
呼叫傳送簡訊的程式
1. intent it = new intent(intent.action_view);
2. it.putextra("sms_body", "the sms text");
3. it.settype("vnd.android-dir/mms-sms");
4. startactivity(it);
傳送簡訊
1. uri uri = uri.parse("smsto:0800000123");
2. intent it = new intent(intent.action_sendto, uri);
3. it.putextra("sms_body", "the sms text");
4. startactivity(it);
傳送彩信
1. uri uri = uri.parse("content://media/external/images/media/23");
2. intent it = new intent(intent.action_send);
3. it.putextra("sms_body", "some text");
4. it.putextra(intent.extra_stream, uri);
5. it.settype("image/png");
6. startactivity(it);
傳送email
1.2. uri uri = uri.parse("mailto:***@abc.com");
3. intent it = new intent(intent.action_sendto, uri);
4. startactivity(it);
1. intent it = new intent(intent.action_send);
2. it.putextra(intent.extra_email, "[email protected]");
3. it.putextra(intent.extra_text, "the email body text");
4. it.settype("text/plain");
5. startactivity(intent.createchooser(it, "choose email client"));
1. intent it=new intent(intent.action_send);
2. string tos=;
3. string ccs=;
4. it.putextra(intent.extra_email, tos);
5. it.putextra(intent.extra_cc, ccs);
6. it.putextra(intent.extra_text, "the email body text");
7. it.putextra(intent.extra_subject, "the email subject text");
8. it.settype("message/rfc822");
9. startactivity(intent.createchooser(it, "choose email client"));
新增附件
1. intent it = new intent(intent.action_send);
2. it.putextra(intent.extra_subject, "the email subject text");
3. it.putextra(intent.extra_stream, "file:///sdcard/mysong.***");
4. sendintent.settype("audio/***");
5. startactivity(intent.createchooser(it, "choose email client"));
1.
2. intent it = new intent(intent.action_view);
3. uri uri = uri.parse("file:///sdcard/song.***");
4. it.setdataandtype(uri, "audio/***");
5. startactivity(it);
2. intent it = new intent(intent.action_view, uri);
3. startactivity(it);
uninstall 程式
1. uri uri = uri.fromparts("package", strpackagename, null);
2. intent it = new intent(intent.action_delete, uri);
3. startactivity(it);
django分頁功能的具體實現
django提供了paginator類來幫助管理分頁資料,這個類存放在django core paginator.py.它可以接收列表 元組或其它可迭代的物件。基本語法示例 1 usr bin env python2 coding utf 8 34 importos5 6from django.co...
intent使用總結
1.指定act ion 和type sim imp ortintent imp ortintent new intent intent.act ion view importintent.settype vnd.android.cursor.item sim contact importintent...
Intent使用總結
intent可以用於各元件之間進行互動,可用於啟動活動 傳遞訊息等。1.顯式呼叫intent intent intent new intent this,class 2.隱式呼叫intent intent intent new intent com.example.activity.action s...