I have an expo app that was working just fine in both iOS and Android, but yesterday I built again and installed the app in Android using the internal test tracks and now the app asks for the needed permissions, I give them but the app acts as is the permission is not given.
I tried reseting all permissions in the app manager, also rebuilt and publish again with expo still nothing.
This is the code I'm using to ask for permissions:
askPermission = async (requestedPermission) => {
// Ask user for permission...
const { status } = await Permissions.askAsync(requestedPermission);
return status;
}
async uploadProfilePicture(){
try{
const status = await this.askPermission(Permissions.CAMERA_ROLL);
if (status !== 'granted') {
Alert.alert(i18n.t('permissions.camera_roll'));
}else{
let result = await ImagePicker.launchImageLibraryAsync();
...
here is my app.json:
{
"expo": {
"name": "eazi",
"slug": "eazi",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"scheme": "eazi",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"primaryColor": "#FFFFFF",
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"buildNumber": "5",
"supportsTablet": true,
"bundleIdentifier": "com.eaziapp.ios",
"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to allow taking pictures to attach to requests."
}
},
"android": {
"versionCode": 7,
"package": "com.eaziapp.android",
"permissions": [
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"CAMERA",
"MANAGE_DOCUMENTS",
"READ_EXTERNAL_STORAGE",
"READ_PHONE_STATE"
]
},
"description": "",
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "obscurred",
"project": "obscurred",
"authToken": "obscurred"
}
}
]
}
}
}