顯示網頁:
1. uri uri = uri.parse("");
2. intent it = new intent(intent.action_viewuri);
3. startactivity(it);
顯示地圖:
1. uri uri = uri.parse("geo:38.-77.");
2. intent it = new intent(intent.action_viewuri);
3. startactivity(it);
路徑規劃:
1. uri uri = uri.parse("");
2. intent it = new intent(intent.action_viewuri);
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_calluri);
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:03");
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:");
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 "");
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);
* 安裝指定apk
*進入聯絡人頁面
intent intent=newintent();
intent.setaction(intent.action_view);
intent.setdata(people.content_uri);
startactivity(intent);
/檢查指定聯絡人
intent intent=newintent();
intent.setaction(intent.action_view);
intent.setdata(personuri);
startactivity(intent);
呼叫系統安裝乙個apk
intent intent=newintent();
startactivity(intent);
//呼叫相簿
public static final string mime_type_image_jpeg = "image/*";
public static final int activity_get_image = 0;
intent getimage = new intent(intent.action_get_content);
getimage.addcategory(intent.category_openable);
getimage.settype(mime_type_image_jpeg);
startactivityforresult(getimage activity_get_image);
//呼叫系統相機應用程式,並儲存拍下來的**
@paramapkname apk名稱
publicvoidsetupapk(string apkname)
字典集合小知識
1,首先來講乙個行列轉置的問題,有乙個磁條,我們往裡存資料,int佔4個位元組,char佔1個等,若當中的乙個被刪掉,則此位置內容為零,而這塊的記憶體卻不能被重複利用,就會造成浪費,為了把空間重新利用起來就用到了鍊錶指標,相當於乙個結構體,包括兩個部分,分別是內容和下乙個指標,第乙個是頭指標和空位1...
Flask小知識集合
flask在上下文中提供了四種變數,分別是 變數名上下文 說明應用上下文 當前啟用程式的程式例項 g應用上下文 處理請求時用作臨時儲存的物件。每次請求都會重設這個變數 request 請求上下文 請求物件,封裝了客戶端發出的http請求中的內容 session 請求上下文 使用者會話,用於儲存請求之...
Android開發小知識
繫結手機返回鍵 繫結手機返回鍵按鈕 override public boolean onkeydown int keycode,keyevent event return super.onkeydown keycode,event 中控制button的顯示隱藏和禁用 設定button屬性 butto...