File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
android/src/main/java/com/RNFetchBlob/Utils Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,18 @@ else if (isDownloadsDocument(uri)) {
45
45
String path = rawuri .getPath ();
46
46
return path ;
47
47
}
48
+
49
+ Long docId = null ;
50
+ //Since Android 10, uri can start with msf scheme like "msf:12345"
51
+ if (id != null && id .startsWith ("msf:" )) {
52
+ final String [] split = id .split (":" );
53
+ docId = Long .valueOf (split [1 ]);
54
+ } else {
55
+ docId = Long .valueOf (id );
56
+ }
57
+
48
58
final Uri contentUri = ContentUris .withAppendedId (
49
- Uri .parse ("content://downloads/public_downloads" ), Long .valueOf (id ));
50
-
59
+ Uri .parse ("content://downloads/public_downloads" ), docId );
51
60
return getDataColumn (context , contentUri , null , null );
52
61
}
53
62
catch (Exception ex ) {
@@ -211,4 +220,4 @@ public static boolean isGooglePhotosUri(Uri uri) {
211
220
return "com.google.android.apps.photos.content" .equals (uri .getAuthority ());
212
221
}
213
222
214
- }
223
+ }
You can’t perform that action at this time.
0 commit comments