Fixes Android 6 file opening failure.

This commit is contained in:
Mark Holmes 2017-02-21 15:09:21 -06:00
parent 92f9f1b250
commit 1e64de3cd3

View File

@ -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);