Skip to content

Commit ae2cc52

Browse files
committed
applied joltup#317
1 parent d8c79f6 commit ae2cc52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

android/src/main/java/com/RNFetchBlob/RNFetchBlob.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ public void actionViewIntent(String path, String mime, final Promise promise) {
119119

120120
// Set flag to give temporary permission to external app to use FileProvider
121121
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
122-
122+
// All the activity to be opened outside of an activity
123+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
123124
// Validate that the device can open the file
124125
PackageManager pm = getCurrentActivity().getPackageManager();
125126
if (intent.resolveActivity(pm) != null) {
@@ -410,4 +411,4 @@ public void getSDCardDir(Promise promise) {
410411
public void getSDCardApplicationDir(Promise promise) {
411412
RNFetchBlobFS.getSDCardApplicationDir(this.getReactApplicationContext(), promise);
412413
}
413-
}
414+
}

0 commit comments

Comments
 (0)