SDK Version: 35
Platforms(Android/iOS/web/all): Android
My app is trying to get photo from user’s camera. I simply use this code in my expo App before calling ImagePicker.launchCameraAsync
const { status } = await Permissions.askAsync(Permissions.CAMERA, Permissions.CAMERA_ROLL);.
if(status !== ‘granted’) {
dispatchMsg(‘error’, ‘We need your permission to get photo’);
return;
}
from user perspective, they will see the system asking for permission twice
The problem is… eventhough user has granted the permission for both, the status are still “denied”! and the funny thing is this only happen in standalone production app. If i’m correctly recall… this issue happen only recently. My app has been in Playstore for more than 6 months and initially there is no problem until recently.
I tried to print debug message on production and this is the result:
Permissions.getAsync(Permissions.CAMERA):
{“status”:“granted”,“expires”:“never”,“permissions”:{“camera”:{“status”:“granted”,“expires”:“never”}}}Permissions.getAsync(Permissions.CAMERA_ROLL):
{“status”:“denied”,“expires”:“never”,“permissions”:{“cameraRoll”:{“status”:“denied”,“expires”:“never”}}}
I was very sure I choose granting the permission… so does the users that reported to me the bug. And like i told you before this issue seem to occur only recently. Any ideas how to solve since this issue only occur in my production app.
EDIT: here is the screenshot of my app permission list from Android Setting. Doesn’t seem to show anything wrong