繁体   English   中英

Android在后台以编程方式安装应用程序

[英]Android installing an application programatically in the background

在我的应用程序中,我正在应用程序的开头安装其他apk以创建运行时环境。 我还有3个要安装在应用程序开始处的APK,我想在运行时安装它,但我不希望安装APK的任何消息。 安装应在后台自动完成。 谢谢。

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);

按照链接-Android以编程方式安装apk

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM