open_file
open_file copied to clipboard
Can't install apk downloaded
Hello!
When we try to update my own app, downloading and reinstalling, open_file asks for a permission to "install from unknown sources". But, after I give the permission and come back to my app, the installation not proceed. It just not do anything. Indeed, If I try to install again, open_file asks again for the same permission, which creates a kind of loop.
What we did, in intet to solve it, is to comment the lines 316-325 (OpenFilePlugin.java) and running the method startActivity() without any verifications, which obviously works for what we need.
Do you know if there is something different to do?
Environment open_file: 3.2.1 Flutter: 2.10.4 Dart: 2.16.2 DevTools: 2.9.2
@RequiresApi(api = Build.VERSION_CODES.M)
private void openApkFile() {
// if (!canInstallApk()) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// startInstallPermissionSettingActivity();
// } else {
// ActivityCompat.requestPermissions(activity,
// new String[]{Manifest.permission.REQUEST_INSTALL_PACKAGES}, REQUEST_CODE);
// }
// } else {
// startActivity();
// }
startActivity();
}