新聞中心
Android操作系統(tǒng)那個(gè)可以通過(guò)調(diào)用手機(jī)平臺(tái)來(lái)實(shí)現(xiàn)一些特定的功能,諸如網(wǎng)頁(yè)的顯示,郵件的發(fā)送等等。那么今天就為大家總結(jié)了幾個(gè)Android調(diào)用平臺(tái)功能的應(yīng)用技巧,幫助大家增加編程經(jīng)驗(yàn)。

目前創(chuàng)新互聯(lián)已為上千家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)站空間、網(wǎng)站運(yùn)營(yíng)、企業(yè)網(wǎng)站設(shè)計(jì)、青陽(yáng)網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。
Android調(diào)用平臺(tái)功能之顯示網(wǎng)頁(yè)
- 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)用平臺(tái)功能之顯示地圖
- Uri uri = Uri.parse("geo:38.899533,-77.036476");
- Intent it = new Intent(Intent.ACTION_VIEW, uri);
- startActivity(it);
- //其他 geo URI 範(fàn)例
- //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 範(fàn)例
- //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)用平臺(tái)功能之撥打電話
- //叫出撥號(hà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);
- //用這個(gè),要在 AndroidManifest.xml 中,加上
- //< uses-permission id="android.permission.CALL_PHONE" />
- //叫出撥號(hà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);
- //用這個(gè),要在 AndroidManifest.xml 中,加上
- //< uses-permission id="android.permission.CALL_PHONE" />
Android調(diào)用平臺(tái)功能之發(fā)送SMS/MMS
- //需寫號(hào)碼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);
- //需寫號(hào)碼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)用平臺(tái)功能的相關(guān)內(nèi)容就為大家介紹到這里。
當(dāng)前文章:Android調(diào)用平臺(tái)功能具體技巧分享
文章分享:http://m.5511xx.com/article/dphjcej.html


咨詢
建站咨詢
