我有一个应用程序,我使用zxing条形码扫描仪扫描二维码.仅当用户在其移动设备中安装条形码扫描仪应用程序时,此功能才有效.那么,我可以通过安装我的应用程序自动安装该应用程序吗?
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(path+"/Bscanner.apk")), "application/vnd.android.package-archive"); startActivity(intent);
但如果可能的话,你必须将Zxing库集成到你的android应用程序中并使用它,所以你不必在设备上安装Bar-code Scanner apk.