android 一些常見的intent請求

2021-07-12 04:52:31 字數 1815 閱讀 3382

//開啟瀏覽器

finaluri uri = uri.parse(

""); intent =newintent(intent.action_view, uri); 

//打**,許可權:

intent intent = new intent();      

intent.setaction(intent.action_call);      

intent.setdata(uri.parse("tel:" + number));      

startactivity(intent);   

/*** 呼叫系統發簡訊功能

*  phonenumber:傳送物件的號碼 * 

message:短息內容

* 新增許可權: */

intent intent = new intent(intent.action_sendto, uri.parse("smsto:"+phonenumber));          

intent.putextra("sms_body", message);

startactivity(intent);

//開啟相簿

intent intent = new intent(intent.action_pick);

intent.setdataandtype(mediastore.images.media.external_content_uri, "image/*");

startactivityforresult(intent, constant.grallery_pic, null);

//開啟相機 許可權:

intent intent = new intent(mediastore.action_image_capture);

if(!photo_dir.exists())

tempfile = new file(photo_dir, getphotofilename());

temppath = tempfile.getabsolutepath();

tempuri = uri.fromfile(tempfile);

intent.putextra(mediastore.extra_output, tempuri);

startactivityforresult(intent, requestcode, tempuri);

顯示地圖

uri uri = uri.parse("geo:40.899533,116036476");  

intent it = new intent(intent.action_view, uri);   

startactivity(it);  

路徑規劃

uri uri = uri.parse("");  

intent it = new intent(intent.action_view, uri);  

startactivity(it);  

//尋找某個應用 

uri uri = uri.parse("market://search?q=pname:pkg_name"); 

intent it = new intent(intent.action_view, uri);  

startactivity(it);  

//顯示某個應用的相關資訊 

intent it = new intent(intent.action_view, uri); 

startactivity(it); 

android一些不常見屬性

2android allowclearuserdata是否給以使用者清楚資料的許可權 預設為true true 表示應用管理者擁有清楚資料的許可權 false 表示應用管理者無清楚資料的許可權 3 android hardwareaccelerated true 能夠給activity和view啟用...

Android 中一些常見的限定符

以下內容全部或部分 或參考於網路。small 提供給小螢幕裝置的資源 normal 提供給中等螢幕裝置的資源 large 提供給大螢幕裝置的資源 xlarge 提供給超大螢幕裝置的資源 ldpi 提供給低解析度裝置的資源 120dpi以下 mdpi 提供給中等解析度裝置的資源 120dpi到 160...

一些常見的術語

1.什麼是cti?電信網路是世界上覆蓋範圍最大的通訊網路,計算機通訊技術也以ip技術為代表,形成了另乙個覆蓋全球的傳輸資料的巨大網路,兩者的融合極大地提高了彼此的通訊能力和處理能力,由此形成計算機 整合技術 computer telephony integration 即cti,國外將其統稱為ct ...