文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > intent常用Uri
侵权投诉

intent常用Uri

android的Intent使用介绍

一、打开一个网页,类别是Intent.ACTION_VIEW

Uri uri = Uri.parse(“doc.guandang.net”);

Intent intent = new Intent(Intent.ACTION_VIEW, uri);

二、打开地图并定位到一个点

Uri uri = Uri.parse(“geo:52.76,-79.0342″);

Intent intent = new Intent(Intent.ACTION_VIEW, uri);

三、打开拨号界面 ,类型是Intent.ACTION_DIAL

Uri uri = Uri.parse(“tel:10086″);

Intent intent = new Intent(Intent.ACTION_DIAL, uri);

四、直接拨打电话,与三不同的是,这个直接拨打电话,而不是打开拨号界面 Uri uri = Uri.parse(“tel:10086″);

Intent intent = new Intent(Intent.ACTION_CALL, uri);

五、卸载一个应用,Intent的类别是Intent.ACTION_DELETE

Uri uri = Uri.fromParts(“package”, “xxx”, null);

Intent intent = new Intent(Intent.ACTION_DELETE, uri);

六、安装应用程序,Intent的类别是Intent.ACTION_PACKAGE_ADDED

Uri uri = Uri.fromParts(“package”, “xxx”, null);

Intent intent = new Intent(Intent.ACTION_PACKAGE_ADDED, uri);

七、播放音频文件

Uri uri = Uri.parse(“doc.guandang.net″);

Intent intent = new Intent(Intent.ACTION_VIEW, uri);

intent.setType(“audio/mp3″);

八、打开发邮件界面

Uri uri= Uri.parse(“mailto:test@163.com”);

Intent intent = new Intent(Intent.ACTION_SENDTO, uri);

九、发邮件,与八不同这里是将邮件发送出去,

Intent intent = new Intent(Intent.ACTION_SEND);

String[] tos = { “ mailto:test@163.com ” };

String[] ccs = { “ test1@163.com ” };

intent.putExtra(Intent.EXTRA_EMAIL, tos);

intent.putExtra(Intent.EXTRA_CC, ccs);

第1页

你可能喜欢

热门文档

相关文档

  • Intent的URI

    Intent的URI_计划/解决方案_应用文书。Intent的URIIntent的URIIntent的URIIntent的URIIntent的URI[Java]代码 view source print? 001 //以下是常用到的Intent的URI...

  • Intent中各种常见的Action

    比较常用。 Input:nothing Output:nothing <activity android:name=".Main" ...URI int requestCode = 1001;Intent intent = new Intent(Intent.ACTION_GET_...

  • 常用的Uri例子

    常用的Uri例子_计算机软件及应用_IT/计算机_专业资料。常用的 Uri 例子 1. Uri uri = Uri.parse("http://www.google.com"); 2. Intent it = new ...

  • Intent和Uri的用法

    Intent和Uri的用法_计算机软件及应用_IT/计算机_专业资料。Intent 的几种用法(... intent的几种常用用法 暂无评价 4页 免费 Intent用法总结以及Acti... 6页 ...

  • intent的常用方法

    intent的常用方法_IT/计算机_专业资料。Intent 在 Android 中的几种用法文章...Intent it = new Intent(Intent.ACTION_VIEW,uri); 3. startActivity(it); ...

  • Android URI简介

    content://media/external/images/media/4 下面是一些常用的 Uri 显示网页: 1...Intent it = new Intent(Intent.ACTION_VIEW,uri); 3. startActivity(it); ...

  • android uri用法

    android uri用法_IT/计算机_专业资料。常用到的Intent的URI及其示例android uri 用法以下是常用到的 Intent 的 URI 及其示例,包含了大部分应用中用到的共用 Intent...

  • 使用Uri与Anction构造Intent,并导向Activity

    使用Uri与Anction构造Intent,并导向Activity_计算机软件及应用_IT/计算机_专业资料。在启动activity的时候也可以使用uri来启动使用Uri 与 Anction 构造 Intent,并导向...

  • Guidelines_URI

    5页 5财富值 常用URI 2页 1财富值 URI-URL-URN 3页 免费 URI_URL_URN联系与区别 2页 免费 UltraSim_URI 24页 免费 intent常用Uri 3页 1财富值...

  • android 常用的intent action整理

    android 常用的intent action整理_计算机软件及应用_IT/计算机_专业资料。android...(Uri.parse("tel:10086"); startActivity(intent); 6.Intent.Action.ALL_APPS...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email