Bladeren bron

add FLAG_ACTIVITY_NEW_TASK

Danh Nguyen 5 jaren geleden
bovenliggende
commit
e51bdd1530
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2
    0
      android/src/main/java/com/RNFetchBlob/RNFetchBlob.java

+ 2
- 0
android/src/main/java/com/RNFetchBlob/RNFetchBlob.java Bestand weergeven

119
 
119
 
120
                 // Set flag to give temporary permission to external app to use FileProvider
120
                 // Set flag to give temporary permission to external app to use FileProvider
121
                 intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
121
                 intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
122
+                 // All the activity to be opened outside of an activity
123
+                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
122
 
124
 
123
                 // Validate that the device can open the file
125
                 // Validate that the device can open the file
124
                 PackageManager pm = getCurrentActivity().getPackageManager();
126
                 PackageManager pm = getCurrentActivity().getPackageManager();