Please provide the following:
- SDK Version: 36.0.0
- Platforms(Android/iOS/web/all): Android
Hi, first of all, I apologize for my English.
I have a problem, I use expo-image-picker to take a picture, upload to Firebase and send via whatsapp. The problem with the app, It’s when I try to use it from the PlayStore, the app ask for permissions and the camera won’t work, but when I use it locally works, opens the camera and do the job.
app.json
"android": {
"package": "com.claus.neuropicture",
"permissions": [
"CAMERA_ROLL",
"CAMERA"
],
"versionCode": 6
},
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<!-- OPTIONAL PERMISSIONS, REMOVE WHATEVER YOU DO NOT NEED -->
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<!-- These require runtime permissions on M -->
<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" />
<!-- END OPTIONAL PERMISSIONS -->
And my function
function UploadImage(props) {
const { imageSelected, setImageSelected, toastRef } = props;
const imageSelect = async () => {
const resultPermission = await Permissions.askAsync(
Permissions.CAMERA_ROLL
);
const resultPermissionCamera =
resultPermission.permissions.cameraRoll.status;
if (resultPermissionCamera === "denied") {
toastRef.current.show("Es necesario aceptar los permisos de cámara");
} else {
const result = await ImagePicker.launchCameraAsync({
allowsEditing: true,
aspect: [3, 4]
});
if (result.cancelled) {
toastRef.current.show("Has cerrado la cámara");
} else {
setImageSelected([...imageSelected, result.uri]);
}
}
};
}