Skip to content

Commit 44add8c

Browse files
authored
Merge pull request #2 from cryptoalex/master
Intent.FLAG_ACTIVITY_NEW_TASK added
2 parents 2528f3a + 7420183 commit 44add8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public void actionViewIntent(String path, String mime, final Promise promise) {
118118

119119
// Set flag to give temporary permission to external app to use FileProvider
120120
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
121-
121+
// All the activity to be opened outside of an activity
122+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
122123
// Validate that the device can open the file
123124
PackageManager pm = getCurrentActivity().getPackageManager();
124125
if (intent.resolveActivity(pm) != null) {

0 commit comments

Comments
 (0)