nativescript-imagepicker: Selecting photos doesnt work on Android Q
All latest…
Selecting a photo returns this error:
Asset '/storage/emulated/0/DCIM/Camera/IMG_20190920_122446.jpg' cannot be found.
And doing something like this:
var img = imageSourceModule.fromFile(selected.android.toString());
results in this error:
Error: java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20190920_122446.jpg: open failed: EACCES (Permission denied)
Does this have something to do with the new Scoped Storage Framework?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 3
- Comments: 18 (3 by maintainers)
For anybody that finds this, @dicksmith pointed this out:
Fun fact, if you want nativescript-imagepicker to work on Android 10, gotta target it (API 29) and add this to the application declaration in the manifest:
@DimitarTodorov is that what I was missing?
It’s no longer allowed to use
android:requestLegacyExternalStorage="true"
if you’re targeting Android 11. From May 5th, I think, we’ll no longer be allowed to submit apps with this flag.I have the same issue and i am running it on a Xiaomi Mi 9 if that helps. Please reopen this issue, as I can confirm the bug. 😦
Thank you. But this seems to be a temporary solution, right? The plugin needs to be adapted to use scoped storage in the future when targeting Android 11 or newer.