-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission error #1259
Comments
@kumold
|
FIXED I've permission keys in Manifest file FIX |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open. |
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you. |
Adding the android:requestLegacyExternalStorage="true" works, I took a wild guess and put it in the part of the AndroidManifest.xml file. It works just fine. The Node.js terminal gives me a lot of text, but it seems to be working. |
I tried adding the requestLegacyExternalStorage thing in every way i can think of, but i didn't work.
Can anyone help me figure it out? |
Add it to |
check out https://github.com/react-native-community/react-native-permissions and @deepankarsandy comment |
Add these both permission of read and write, to solve this issue
Add this below line in Application tag |
Added android:requestLegacyExternalStorage="true" to the application tag, still facing same issue. Please help me if anyone knows howto fix |
still the same error: {"errorCode": "permission"} manifest:
package.json:
the error occures when I am calling this function:
any solution? |
What |
@ravirajn22
|
From the docs
So you have to obtain WRITE_EXTERNAL_STORAGE using built in react-native permissions or some third party library |
@ravirajn22 Thank you, I got it. |
This should be open. As we know Android 11 is getting a new permission with a different way to access the files. Is there any update for this? https://support.google.com/googleplay/android-developer/answer/10467955 |
Any update about new permission for Android 11? |
Nothing new ? Discussion also open here : #1672 |
|
Alright, even if it's just moving the problem somewhere else, if I want to use image-picker correctly, I'll still have to use requestLegacyExternalStorage... |
@MayoudP no |
Is there any way to solve this problem on an expo app, because the android manifest file isn't available in expo environment |
hello,
i have added the following permissions
and i have also tried adding do anyone have the solution to the this problem ? Note: |
You could try following: <!-- AndroidManifest.xml -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" /> // JavaScrip
if (isAndroid) {
const isGranted = await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.CAMERA);
if (isGranted) launchCamera(opts, handler);
else {
const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.CAMERA);
if (granted === PermissionsAndroid.RESULTS.GRANTED) launchCamera(opts, handler);
else openAlert();
}
} else {
// iOS
launchCamera(opts, handler);
} It works, but yesterday i got some bugs from production Android 10 devices - user not granted access to photos, even though app pops up alert which asks user to grant it, but either way grant or not i still do not have access to photos. Meybe for older Android we still need android:requestLegacyExternalStorage="true" property. Could you please tell me what devices you use for develpment (model and system version)? Could you also tell me what is set in your gradle.build for the following: buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30 |
Bug
In android, image picker asks permission even though it was granted before. And after granted, image picker does not show anything with console error " Permissions weren't granted". Tried in android 10 emulator.
Environment info
React native info output:
Library version: x.x.x
Steps To Reproduce
...
Describe what you expected to happen:
Reproducible sample code
The text was updated successfully, but these errors were encountered: