Merge pull request #96 from MHolmes91/master

Fixes Android 6 file opening failure.
This commit is contained in:
pwlin 2017-02-22 01:12:34 +01:00 committed by GitHub
commit 0e4f364ecf

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