File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 26
26
"tns-core-modules" : " ^4.0.0"
27
27
},
28
28
"devDependencies" : {
29
- "@angular/compiler-cli" : " ~6.1.0-beta.1" ,
30
29
"babel-traverse" : " 6.24.1" ,
31
30
"babel-types" : " 6.24.1" ,
32
31
"babylon" : " 6.16.1" ,
42
41
"tns-platform-declarations" : " ^3.0.0" ,
43
42
"tslint" : " ~5.4.3" ,
44
43
"typescript" : " ~2.7.2" ,
45
- "zone.js" : " ^0.8.4" ,
46
- "@ngtools/webpack" : " 6.1.0-rc.0"
44
+ "zone.js" : " ^0.8.4"
47
45
},
48
46
"scripts" : {
49
47
"build.plugin" : " cd ../src && npm run build" ,
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ class UriHelper {
26
26
// DownloadsProvider
27
27
else if ( UriHelper . isDownloadsDocument ( uri ) ) {
28
28
id = DocumentsContract . getDocumentId ( uri ) ;
29
+ // Since Oreo the downloads id may be a raw string,
30
+ // containing the file path:
31
+ if ( id . indexOf ( "raw:" ) !== - 1 ) {
32
+ return id . substring ( 4 , id . length ) ;
33
+ }
29
34
contentUri = android . content . ContentUris . withAppendedId (
30
35
android . net . Uri . parse ( "content://downloads/public_downloads" ) , long ( id ) ) ;
31
36
@@ -196,8 +201,8 @@ export class ImagePicker {
196
201
intent . putExtra ( "android.intent.extra.ALLOW_MULTIPLE" , true ) ;
197
202
}
198
203
199
- intent . setAction ( Intent . ACTION_GET_CONTENT ) ;
200
-
204
+ intent . putExtra ( android . content . Intent . EXTRA_LOCAL_ONLY , true ) ;
205
+ intent . setAction ( "android.intent.action.OPEN_DOCUMENT" ) ;
201
206
let chooser = Intent . createChooser ( intent , "Select Picture" ) ;
202
207
application . android . foregroundActivity . startActivityForResult ( intent , RESULT_CODE_PICKER_IMAGES ) ;
203
208
} ) ;
You can’t perform that action at this time.
0 commit comments