偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Android調(diào)用平臺功能具體技巧分享

移動開發(fā) Android
我們在這篇文章中為大家總結(jié)的Android調(diào)用平臺功能都包括有:顯示網(wǎng)頁;顯示地圖;撥打電話;發(fā)送SMS/MMS等等。

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

Android調(diào)用平臺功能之顯示網(wǎng)頁

  1. Uri uri = Uri.parse("http://google.com");   
  2. Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  3. startActivity(it);   
  4. Uri uri = Uri.parse("http://google.com");   
  5. Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  6. startActivity(it);  

Android調(diào)用平臺功能之顯示地圖

  1. Uri uri = Uri.parse("geo:38.899533,-77.036476");   
  2. Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  3. startActivity(it);   
  4. //其他 geo URI 範例   
  5. //geo:latitude,longitude   
  6. //geo:latitude,longitude?z=zoom   
  7. //geo:0,0?q=my+street+address   
  8. //geo:0,0?q=business+near+city   
  9. //google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,
    zoom&
    mz=mapZoom   
  10. Uri uri = Uri.parse("geo:38.899533,-77.036476");   
  11. Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  12. startActivity(it);   
  13. //其他 geo URI 範例   
  14. //geo:latitude,longitude   
  15. //geo:latitude,longitude?z=zoom   
  16. //geo:0,0?q=my+street+address   
  17. //geo:0,0?q=business+near+city   
  18. //google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,
    zoom&
    mz=mapZoom 

Android調(diào)用平臺功能之撥打電話

  1. //叫出撥號程式   
  2. Uri uri = Uri.parse("tel:0800000123");   
  3. Intent it = new Intent(Intent.ACTION_DIAL, uri);   
  4. startActivity(it);   
  5. //直接打電話出去   
  6. Uri uri = Uri.parse("tel:0800000123");   
  7. Intent it = new Intent(Intent.ACTION_CALL, uri);   
  8. startActivity(it);   
  9. //用這個,要在 AndroidManifest.xml 中,加上   
  10. //< uses-permission id="android.permission.CALL_PHONE" />   
  11. //叫出撥號程式   
  12. Uri uri = Uri.parse("tel:0800000123");   
  13. Intent it = new Intent(Intent.ACTION_DIAL, uri);   
  14. startActivity(it);   
  15. //直接打電話出去   
  16. Uri uri = Uri.parse("tel:0800000123");   
  17. Intent it = new Intent(Intent.ACTION_CALL, uri);   
  18. startActivity(it);   
  19. //用這個,要在 AndroidManifest.xml 中,加上   
  20. //< uses-permission id="android.permission.CALL_PHONE" />  

Android調(diào)用平臺功能之發(fā)送SMS/MMS

  1. //需寫號碼SMS   
  2. Intent it = new Intent(Intent.ACTION_VIEW);   
  3. it.putExtra("sms_body", "The SMS text");   
  4. it.setType("vnd.android-dir/mms-sms");   
  5. startActivity(it);   
  6. //發(fā)送SMS   
  7. Uri uri = Uri.parse("smsto:0800000123");   
  8. Intent it = new Intent(Intent.ACTION_SENDTO, uri);   
  9. it.putExtra("sms_body", "The SMS text");   
  10. startActivity(it);   
  11. //發(fā)送MMS   
  12. Uri uri = Uri.parse("content://media/external
    /images/media/23");   
  13. Intent it = new Intent(Intent.ACTION_SEND);   
  14. it.putExtra("sms_body", "some text");   
  15. it.putExtra(Intent.EXTRA_STREAM, uri);   
  16. it.setType("image/png");   
  17. startActivity(it);   
  18. //需寫號碼SMS   
  19. Intent it = new Intent(Intent.ACTION_VIEW);   
  20. it.putExtra("sms_body", "The SMS text");   
  21. it.setType("vnd.android-dir/mms-sms");   
  22. startActivity(it);   
  23. //發(fā)送SMS   
  24. Uri uri = Uri.parse("smsto:0800000123");   
  25. Intent it = new Intent(Intent.ACTION_SENDTO, uri);   
  26. it.putExtra("sms_body", "The SMS text");   
  27. startActivity(it);   
  28. //發(fā)送MMS   
  29. Uri uri = Uri.parse("content://media/external/
    images/media/23");   
  30. Intent it = new Intent(Intent.ACTION_SEND);   
  31. it.putExtra("sms_body", "some text");   
  32. it.putExtra(Intent.EXTRA_STREAM, uri);   
  33. it.setType("image/png");   
  34. startActivity(it); 

Android調(diào)用平臺功能的相關(guān)內(nèi)容就為大家介紹到這里。

【編輯推薦】

  1. Android Java包各種功能概覽
  2. Android滑動手勢偵測方法介紹
  3. Android拍照實現(xiàn)方式概述
  4. Android數(shù)據(jù)庫相關(guān)代碼解讀
  5. Android系統(tǒng)信息查看方法詳解
責任編輯:曹凱 來源: javaeye.com
相關(guān)推薦

2009-12-28 10:40:13

WPF調(diào)用Winfor

2010-01-27 18:06:03

Android短信發(fā)送

2009-11-25 17:28:26

PHP對話

2010-02-25 15:25:19

WCF通道

2009-12-08 14:00:11

PHP函數(shù)microt

2010-02-23 13:03:34

WCF序列化

2009-12-01 10:50:45

PHP函數(shù)requir

2009-12-30 10:25:03

Silverlight

2010-01-25 11:09:58

Android Htt

2010-02-24 17:07:26

WCF序列化引擎

2010-03-05 16:09:44

Python中文字符

2010-01-13 16:45:44

VB.NET刪除控件

2010-01-25 17:21:34

Android Act

2010-01-28 17:12:45

Android閃屏

2010-01-25 16:08:37

Android ADB

2010-01-25 18:33:35

Android鍵盤操作

2009-12-01 14:26:19

PHP函數(shù)ob_sta

2010-02-03 15:35:00

C++輸入輸出漢字

2009-11-26 09:18:56

PHP函數(shù)參數(shù)傳遞方法

2010-03-01 17:28:25

WCF Stream對
點贊
收藏

51CTO技術(shù)棧公眾號