diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java index ac9ce5669..14b11e38b 100644 --- a/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java +++ b/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java @@ -120,11 +120,8 @@ public void actionViewIntent(String path, String mime, final Promise promise) { // Set flag to give temporary permission to external app to use FileProvider intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); - // Validate that the device can open the file - PackageManager pm = getCurrentActivity().getPackageManager(); - if (intent.resolveActivity(pm) != null) { - this.getReactApplicationContext().startActivity(intent); - } + // Do not validate that the device can open the file - instead let it throw + this.getReactApplicationContext().startActivity(intent); } else { Intent intent = new Intent(Intent.ACTION_VIEW) @@ -410,4 +407,4 @@ public void getSDCardDir(Promise promise) { public void getSDCardApplicationDir(Promise promise) { RNFetchBlobFS.getSDCardApplicationDir(this.getReactApplicationContext(), promise); } -} \ No newline at end of file +}