新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Android調(diào)用平臺功能具體技巧分享
Android操作系統(tǒng)那個可以通過調(diào)用手機平臺來實現(xiàn)一些特定的功能,諸如網(wǎng)頁的顯示,郵件的發(fā)送等等。那么今天就為大家總結了幾個Android調(diào)用平臺功能的應用技巧,幫助大家增加編程經(jīng)驗。

目前創(chuàng)新互聯(lián)已為上千家的企業(yè)提供了網(wǎng)站建設、域名、網(wǎng)站空間、網(wǎng)站運營、企業(yè)網(wǎng)站設計、青陽網(wǎng)站維護等服務,公司將堅持客戶導向、應用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
Android調(diào)用平臺功能之顯示網(wǎng)頁
- Uri uri = Uri.parse("http://google.com");
- Intent it = new Intent(Intent.ACTION_VIEW, uri);
- startActivity(it);
- Uri uri = Uri.parse("http://google.com");
- Intent it = new Intent(Intent.ACTION_VIEW, uri);
- startActivity(it);
Android調(diào)用平臺功能之顯示地圖
- 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調(diào)用平臺功能之撥打電話
- //叫出撥號程式
- 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調(diào)用平臺功能之發(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);
Android調(diào)用平臺功能的相關內(nèi)容就為大家介紹到這里。
新聞標題:Android調(diào)用平臺功能具體技巧分享
標題網(wǎng)址:http://m.fisionsoft.com.cn/article/dphjcej.html


咨詢
建站咨詢
