Fix it for Android apk packages too

This commit is contained in:
KleggerKoder 2019-08-21 21:04:54 -04:00 committed by GitHub
parent ca406994ef
commit 2e704e1b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ public class FileOpener2 extends CordovaPlugin {
path = Uri.fromFile(file);
} else {
Context context = cordova.getActivity().getApplicationContext();
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".opener.provider", file);
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".provider", file);
}
intent.setDataAndType(path, contentType);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK);