安卓APK安装编程 [英] Android install apk programmatically

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

问题描述

是否有可能以编程方式安装APK在后台或用户是否必须接受安装。

Is it possible to install an apk programmatically in the background or does the user have to accept the installation.

我的情况是,我希望我的员工都具有相同的一组安装的应用程序。

My scenario is that I want my employees to all have the same set of applications installed.

当然,他们可以由他们自行安装应用程序,但我想他们都拥有至少安装了一些应用程序。

Of course they can install applications by them self, but I want them all to have at least some applications installed.

我不是在谈论从市场安装应用程序。

推荐答案

<一个href="http://stackoverflow.com/questions/4967669/android-install-apk-programmatically/4969421#4969421">solution在这个环节

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")),"application/vnd.android.package-archive");
startActivity(intent);

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

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