From 2e704e1b26c511d56da6e97092895cfdc4d56314 Mon Sep 17 00:00:00 2001 From: KleggerKoder Date: Wed, 21 Aug 2019 21:04:54 -0400 Subject: [PATCH] Fix it for Android apk packages too --- .../github/pwlin/cordova/plugins/fileopener2/FileOpener2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/io/github/pwlin/cordova/plugins/fileopener2/FileOpener2.java b/src/android/io/github/pwlin/cordova/plugins/fileopener2/FileOpener2.java index 3375524..383c393 100644 --- a/src/android/io/github/pwlin/cordova/plugins/fileopener2/FileOpener2.java +++ b/src/android/io/github/pwlin/cordova/plugins/fileopener2/FileOpener2.java @@ -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);