ImagePicker.launchCameraAsync() not working on android Standalone after update expo sdk 45 but works on expo go

Please provide the following:

  1. SDK Version: 45.0.0
  2. Platforms(Android/iOS/web/all): Android

ImagePicker.launchCameraAsync() not working on android Standalone after update expo sdk 45 but works on expo go

async pickCamera() {
        const { status: existingStatus } = await ImagePicker.getCameraPermissionsAsync();
        if (existingStatus !== 'granted') {
            const { status } = await ImagePicker.requestCameraPermissionsAsync();
            if (status !== 'granted') {
                alert('Sorry, we need camera roll permissions to make this work!');
            }
        }

        let result = await ImagePicker.launchCameraAsync({
            mediaTypes: ImagePicker.MediaTypeOptions.Images,
            quality: 0,
        });

        if (!result.cancelled) {
            this._ImageManipulate(result)
        }
    };

Do you have the necessary permissions in your app.json file?
Check if you have something like that.
“expo”:{

“android”: {
“package”: “com.dummy.dummy”,
“versionCode”: 1,
“permissions”: [“CAMERA”, “READ_EXTERNAL_STORAGE”, “WRITE_EXTERNAL_STORAGE”]
}
}

“permissions”: [
“CAMERA”,
“ACCESS_MEDIA_LOCATION”
]

Are “READ_EXTERNAL_STORAGE”, “WRITE_EXTERNAL_STORAGE” required as well?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.