


下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
【移動應用開發(fā)技術】Android中怎么調用平臺功能
這篇文章給大家介紹Android中怎么調用平臺功能,內容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。Android調用平臺功能之顯示網頁Uri
uri
=
Uri.parse("");
Intent
it
=
new
Intent(Intent.ACTION_VIEW,
uri);
startActivity(it);
Uri
uri
=
Uri.parse("");
Intent
it
=
new
Intent(Intent.ACTION_VIEW,
uri);
startActivity(it);Android調用平臺功能之顯示地圖Uri
uri
=
Uri.parse("geo:38.899533,-77.036476");
Intent
it
=
new
Intent(Intent.ACTION_VIEW,
uri);
startActivity(it);
//其他
geo
URI
範例
//geo:latitude,longitude
//geo:latitude,longitude?z=zoom
//geo:0,0?q=my+street+address
//geo:0,0?q=business+near+city
//google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
Uri
uri
=
Uri.parse("geo:38.899533,-77.036476");
Intent
it
=
new
Intent(Intent.ACTION_VIEW,
uri);
startActivity(it);
//其他
geo
URI
範例
//geo:latitude,longitude
//geo:latitude,longitude?z=zoom
//geo:0,0?q=my+street+address
//geo:0,0?q=business+near+city
//google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
Uri
uri
=
Uri.parse("geo:38.899533,-77.036476");
Intent
it
=
new
Intent(Intent.ACTION_VIEW,
uri);
startActivity(it);
//其他
geo
URI
範例
//geo:latitude,longitude
//geo:latitude,longitude?z=zoom
//geo:0,0?q=my+street+address
//geo:0,0?q=business+near+city
//google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
Uri
uri
=
Uri.parse("geo:38.899533,-77.036476");
Intent
it
=
new
Intent(Intent.ACTION_VIEW,
uri);
startActivity(it);
//其他
geo
URI
範例
//geo:latitude,longitude
//geo:latitude,longitude?z=zoom
//geo:0,0?q=my+street+address
//geo:0,0?q=business+near+city
//google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
Android調用平臺功能之撥打電話//叫出撥號程式
Uri
uri
=
Uri.parse("tel:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_DIAL,
uri);
startActivity(it);
//直接打電話出去
Uri
uri
=
Uri.parse("tel:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_CALL,
uri);
startActivity(it);
//用這個,要在
AndroidManifest.xml
中,加上
//<
uses-permission
id="android.permission.CALL_PHONE"
/>
//叫出撥號程式
Uri
uri
=
Uri.parse("tel:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_DIAL,
uri);
startActivity(it);
//直接打電話出去
Uri
uri
=
Uri.parse("tel:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_CALL,
uri);
startActivity(it);
//用這個,要在
AndroidManifest.xml
中,加上
//<
uses-permission
id="android.permission.CALL_PHONE"
/>Android調用平臺功能之發(fā)送SMS/MMS//需寫號碼SMS
Intent
it
=
new
Intent(Intent.ACTION_VIEW);
it.putExtra("sms_body",
"The
SMS
text");
it.setType("vnd.android-dir/mms-sms");
startActivity(it);
//發(fā)送SMS
Uri
uri
=
Uri.parse("smsto:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_SENDTO,
uri);
it.putExtra("sms_body",
"The
SMS
text");
startActivity(it);
//發(fā)送MMS
Uri
uri
=
Uri.parse("content://media/external/images/media/23");
Intent
it
=
new
Intent(Intent.ACTION_SEND);
it.putExtra("sms_body",
"some
text");
it.putExtra(Intent.EXTRA_STREAM,
uri);
it.setType("image/png");
startActivity(it);
//需寫號碼SMS
Intent
it
=
new
Intent(Intent.ACTION_VIEW);
it.putExtra("sms_body",
"The
SMS
text");
it.setType("vnd.android-dir/mms-sms");
startActivity(it);
//發(fā)送SMS
Uri
uri
=
Uri.parse("smsto:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_SENDTO,
uri);
it.putExtra("sms_body",
"The
SMS
text");
startActivity(it);
//發(fā)送MMS
Uri
uri
=
Uri.parse("content://media/external/images/media/23");
Intent
it
=
new
Intent(Intent.ACTION_SEND);
it.putExtra("sms_body",
"some
text");
it.putExtra(Intent.EXTRA_STREAM,
uri);
it.setType("image/png");
startActivity(it);
//需寫號碼SMS
Intent
it
=
new
Intent(Intent.ACTION_VIEW);
it.putExtra("sms_body",
"The
SMS
text");
it.setType("vnd.android-dir/mms-sms");
startActivity(it);
//發(fā)送SMS
Uri
uri
=
Uri.parse("smsto:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_SENDTO,
uri);
it.putExtra("sms_body",
"The
SMS
text");
startActivity(it);
//發(fā)送MMS
Uri
uri
=
Uri.parse("content://media/external/images/media/23");
Intent
it
=
new
Intent(Intent.ACTION_SEND);
it.putExtra("sms_body",
"some
text");
it.putExtra(Intent.EXTRA_STREAM,
uri);
it.setType("image/png");
startActivity(it);
//需寫號碼SMS
Intent
it
=
new
Intent(Intent.ACTION_VIEW);
it.putExtra("sms_body",
"The
SMS
text");
it.setType("vnd.android-dir/mms-sms");
startActivity(it);
//發(fā)送SMS
Uri
uri
=
Uri.parse("smsto:0800000123");
Intent
it
=
new
Intent(Intent.ACTION_SENDTO,
uri);
it.putExtra("sms_body",
"The
SMS
text");
startActivity(it);
//發(fā)送MMS
Uri
uri
=
Uri.parse("content://media/external/images/media/23");
Intent
it
=
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 農牧設備回收合同范本
- app軟件采購合同范本
- 勞動合同范本 簡約
- 佛山機械購銷合同范本
- 京東供貨方合同范本
- 加工協(xié)作合同范本
- 勞務合同范本保密協(xié)議
- 動漫公司產品合同范本
- 修理提成合同范例
- 全款買車正規(guī)合同范本
- 經典文學作品中的女性形象研究外文文獻翻譯2016年
- 控股集團公司組織架構圖.docx
- 高爐煤氣安全知識的培訓
- 2008 年全國高校俄語專業(yè)四級水平測試試卷
- 需求供給與均衡價格PPT課件
- 最常用2000個英語單詞_(全部標有注釋)字母排序
- 人造革的幾種生產制造方法
- 在銀行大零售業(yè)務工作會議上的講話講解學習
- 古代傳說中的藝術形象-
- 水電站大壩土建安裝工程懸臂模板施工手冊
- 三體系內審檢查表(共58頁).doc
評論
0/150
提交評論