一次安装多个apk [英] installing multiple apks at once

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

问题描述

我想一次安装多个 APK,因为我有一个主应用程序可以完成所有工作,而所有其他应用程序都有一项服务和一项活动,必须将其放在设备上才能运行主应用程序,是吗?最好将它们包含在 zip 中我知道会发生这样的事情,因为 su.zip 做了类似的事情

I wanted to install multiple APKs at a time because I am having one main app that does everything and all the other apps have a service and an activity that has to be put on the device for the main one to run, would it be best to include them in a zip I know something like this happens because su.zip does something similar

推荐答案

我不得不做这样的事情来更新我的多个企业 APK.我从 REST API/数据库下载了 APK.然后一旦我有了文件,我就通过调用开始在程序中安装应用程序:

I had to do something like this for updating my multiple Enterprise APKs. I downloaded the APK from a REST API/ database. Then once I had the file I started the install of the app in program by calling:

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

这将启动安装程序并安装 APK.

This will start the installer and install the APK.

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

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