Hello everybody,
when i use this code, status come “granted” but i cannot open the camera
const permissions = Permissions.CAMERA;
const { status } = await Permissions.askAsync(permissions);
if (status === "granted") {
let image = await ImagePicker.launchCameraAsync({
mediaTypes: "Images",
allowsEditing: true,
aspect: [4, 3],
base64: true
}).catch(error => console.log(permissions, { error }));
this.setState({ editPhoto: image.uri });
ImageManipulator.manipulate(image.uri, [], {
base64: true,
compress: 0
}).then(img => {
ProfileStore.setBaseImage(img.base64);
});
}
what’s wrong ?
i’m using expo sdk 30.0.0