android 调用安装界面
来源:互联网 发布:壁虎java 编辑:程序博客网 时间:2024/06/11 18:29
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(Uri.parse("file://" + apkPath), type);
/*
* 经过实验,发现无论是否成功安装,该Intent都返回result为0 具体结果如下: type requestCode
* resultCode data 取消安装 10086 0 null 覆盖安装 10086 0 null 全新安装 10086 0
* null
*/
context.startActivity(intent);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(android.content.Intent.ACTION_VIEW);
String type = "application/vnd.android.package-archive";
intent.setDataAndType(Uri.parse("file://" + apkPath), type);
/*
* 经过实验,发现无论是否成功安装,该Intent都返回result为0 具体结果如下: type requestCode
* resultCode data 取消安装 10086 0 null 覆盖安装 10086 0 null 全新安装 10086 0
* null
*/
context.startActivity(intent);
- android 调用安装界面
- Android调用系统安装界面
- android 调用系统界面
- android 调用系统界面
- android 调用系统界面
- android 调用系统界面
- android 调用系统界面
- android 调用系统界面
- android 调用系统界面
- android 调用系统界面
- Android调用另一个App界面
- Android调用拨打电话界面
- 调用android系统内部的安装apk应用界面进行安装应用程序,例如需要更新应用程序
- android 调用拨号返回调用界面
- android安装时注册界面
- Android打开应用程序安装界面
- Android 登录界面调用输入法时让界面自动上移
- 调用系统联系人的添加界面-android
- 解决 SyntaxHighlighter 出现 can't find brush for ... 的问题
- [笔记]NFC笔记——主动模式和被动模式下激活协议的流程
- lua学习笔记 3 android调用Lua。Lua脚本使用LoadLib回调Java,并传多个参数
- CGBitmapContextCreate()的使用方法
- xCode4里面设置NSZombieEnabled
- android 调用安装界面
- 转载:终极解决下载文件名乱码
- HTML5--本地存储Web Storage
- ACdream 1022
- Oracle sys和system用户、sysdba 和sysoper系统权限、sysdba和dba角色的区别
- 网线制作
- 转:在网页html/aspx中增加一段播放器代码
- MySql常用命令总结
- Windows的ANSI和UNICODE字符集