mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 03:52:51 +08:00
Fix it for Android apk packages too
This commit is contained in:
parent
ca406994ef
commit
2e704e1b26
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user