自动安装的apk [英] automatic install of apk

查看:172
本文介绍了自动安装的apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能以编程方式触发APK是卡上安装?

解决方案

 意向意图=新的意图(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(新文件(文件名)),应用程序/ vnd.android.package存档);
startActivity(意向);
 

(礼貌 anddev.org 的)

I'd like to know if it is possible to trigger programmatically the installation of an apk that is on the card ?

解决方案

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(fileName)), "application/vnd.android.package-archive");
startActivity(intent);

(courtesy of anddev.org)

这篇关于自动安装的apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆