【发布时间】:2012-06-23 15:29:07
【问题描述】:
我正在以编程方式安装一个 android 应用程序。将出现一个对话框“使用完成操作”。它们之间有许多选项“包安装程序”。如何在不要求用户选择的情况下隐式选择“包安装程序”?
编辑 我使用的代码是:
Intent intent = new Intent();
intent .setDataAndType(Uri.fromFile(new File("/mnt/sdcard/download/App.apk")),"application/vnd.android.package-archive");
startActivity(intent);
【问题讨论】:
-
请显示您用于尝试安装应用程序的代码。另外,请显示您的选择器的屏幕截图,以显示您可以使用的“许多选项”。
-
我将编辑我的问题。
-
请将
ACTION_VIEW添加到您的Intent。
标签: java android installation action package-managers