mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-03-14 13:51:01 +08:00
Merge pull request #96 from MHolmes91/master
Fixes Android 6 file opening failure.
This commit is contained in:
commit
0e4f364ecf
@ -98,7 +98,7 @@ public class FileOpener2 extends CordovaPlugin {
|
||||
try {
|
||||
Uri path = Uri.fromFile(file);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
if(Build.VERSION.SDK_INT >= 24){
|
||||
if(Build.VERSION.SDK_INT >= 23){
|
||||
|
||||
Context context = cordova.getActivity().getApplicationContext();
|
||||
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".opener.provider", file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user