浏览代码

Merge pull request #317 from ferocia/android-9-open-file

Add the FLAG_ACTIVITY_NEW_TASK flag.
Travis Nuttall 6 年前
父节点
当前提交
90ce0c401a
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      android/src/main/java/com/RNFetchBlob/RNFetchBlob.java

+ 3
- 1
android/src/main/java/com/RNFetchBlob/RNFetchBlob.java 查看文件

121
                  // All the activity to be opened outside of an activity
121
                  // All the activity to be opened outside of an activity
122
                 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
122
                 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
123
 
123
 
124
+                // All the activity to be opened outside of an activity
125
+                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
124
                 // Validate that the device can open the file
126
                 // Validate that the device can open the file
125
                 PackageManager pm = getCurrentActivity().getPackageManager();
127
                 PackageManager pm = getCurrentActivity().getPackageManager();
126
                 if (intent.resolveActivity(pm) != null) {
128
                 if (intent.resolveActivity(pm) != null) {
411
     public void getSDCardApplicationDir(Promise promise) {
413
     public void getSDCardApplicationDir(Promise promise) {
412
         RNFetchBlobFS.getSDCardApplicationDir(this.getReactApplicationContext(), promise);
414
         RNFetchBlobFS.getSDCardApplicationDir(this.getReactApplicationContext(), promise);
413
     }
415
     }
414
-}
416
+}