Android调用平台功能具体技巧分享
2010-05-09 14:29
549 查看
http://blog.csdn.net/Alinaxz/archive/2010/04/19/5503168.aspx
Android操作系统那个可以通过调用手机平台来实现一些特定的功能,诸如网页的显示,邮件的发送等等。那么今天就为大家总结了几个Android调用平台功能的应用技巧,帮助大家增加编程经验。 Android调用平台功能之显示网页 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 调用平台功能之显示地图 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调用平台功能之发送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); //发送SMS Uri uri = Uri.parse("smsto:0800000123"); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra("sms_body", "The SMS text"); startActivity(it); //发送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); //发送SMS Uri uri = Uri.parse("smsto:0800000123"); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra("sms_body", "The SMS text"); startActivity(it); //发送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调用平台功能的相关内容就为大家介绍到这里
Android操作系统那个可以通过调用手机平台来实现一些特定的功能,诸如网页的显示,邮件的发送等等。那么今天就为大家总结了几个Android调用平台功能的应用技巧,帮助大家增加编程经验。 Android调用平台功能之显示网页 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 调用平台功能之显示地图 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调用平台功能之发送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); //发送SMS Uri uri = Uri.parse("smsto:0800000123"); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra("sms_body", "The SMS text"); startActivity(it); //发送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); //发送SMS Uri uri = Uri.parse("smsto:0800000123"); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra("sms_body", "The SMS text"); startActivity(it); //发送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调用平台功能的相关内容就为大家介绍到这里
相关文章推荐
- Android调用平台功能具体技巧分享
- Android调用平台功能具体技巧分享
- Android调用平台功能具体技巧分享
- Android调用平台功能具体技巧分享
- ndroid调用平台功能具体技巧分享
- Android:调用系统分享功能
- 调用android平台功能-拨号,地图,网页,短信,Email,播放多媒体
- Android调用已安装市场平台(如Google Play商店,豌豆荚,百度手机助手,应用宝等)评论功能
- Android应用调用软件评分以及分享功能
- 在Android中使App快速、简单地支持新浪微博、微信、QQ、facebook等十几个主流社交平台的分享功能
- Android调用系统分享功能以及createChooser的使用
- [置顶] 在Android中使App快速、简单地支持新浪微博、微信、QQ、facebook等十几个主流社交平台的分享功能
- android调用平台功能
- Android调用系统本身的分享功能
- Android调用系统分享功能总结
- 调用android平台功能-拨号,地图,网页,短信,Email,播放多媒体
- 探索Android调用系统的分享功能
- Android调用平台功能
- Android调用系统分享功能以及createChooser的使用
- Android端App调用微信分享的具体流程记录