android 版本更新
2016-06-13 12:37
501 查看
让apk安装后自动启动
参考链接 :
@Override public void onSuccess(ResponseInfo<File> arg0) { System.out.println("下载成功"); // 跳转到系统下载页面 Intent intent = new Intent(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setDataAndType(Uri.fromFile(arg0.result), "application/vnd.android.package-archive"); // startActivity(intent); startActivityForResult(intent, 0);// 如果用户取消安装的话, // 会返回结果,回调方法onActivityResult //启动手机中的一个APK文件,如启动test.apk android.os.Process.killProcess(android.os.Process.myPid()); }
参考链接 :
http://blog.csdn.net/codenoodles/article/details/50557034
相关文章推荐
- 安卓播放声音同时震动的效果实现
- Android 热修复-AndFix
- Android系统中自定义按键的短按、双击、长按事件
- Android中的Animation动画(xml)
- Android fill_parent、wrap_content和match_parent的区别
- Android 时区设置以及设置系统属性的分析
- Android将Xamarin For VS升级为4.1.0.530版教程
- PullToRefreshListView addHeaderView 下拉刷新冲突问题
- Android应用程序消息处理机制(Looper、Handler)分析
- AndroidJUnitRunner在gradle项目中如何配置
- Android 5.X 新特性详解(五)——Toolbar
- Service要点全解析
- 自定义属性,所有format的相关介绍
- android Service 生命周期和使用注意项
- 深入理解Android(一):Gradle详解
- Android中onRetainNonConfigurationInstance和getLastNonConfigurationInstance
- android sqlite 插入行计算
- android 6.0 权限授权
- android 流行的开源框架
- Android内存优化