React Native [Android]
Samsung Phone
Libraries :
- react-native-document-picker [ returns our URI]
- react-native-get-real-path [ converts URI to real path]
Able to :
- Get a URI from local files and get real path including images
- Able to get URI from Google Drive when I select a file
Unable :
Convert Google Drive URI to real path
DocumentPicker.show({filetype: [DocumentPickerUtil.allFiles()],},(error,res) => { RNGRP.getRealPathFromURI(path).then(function(androidPath){ console.log('AndroidPath : ', androidPath); }) }
my URI from google drive is like so :
content://com.google.android.apps.docs.storage/document/acc%3D2%3Bdoc%3D1