Hi,
I’m struggling a bit with using the camera on Android. And… I get a feeling I’m not alone?
-
Expo V31
-
Detached
Permissions.askAsync(Permissions.CAMERA_ROLL)
returns denied, no dialog to grant permissions is showed.
Permissions.askAsync(Permissions.CAMERA)
seems to be working fine - shows dialog, returns granted
when supposed to.
ImagePicker.launchCameraAsync
- no action, never returns or opens camera.
ImagePicker.launchImageLibraryAsync
- works as expected.
askPermissionsAsync = async () => {
const p1 = await Permissions.askAsync(Permissions.CAMERA);
const p2 = await Permissions.askAsync(Permissions.CAMERA_ROLL);
};
chooseImage = async () => {
await this.askPermissionsAsync();
const result = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true,
aspect: [4, 3]
});
...
snapPhoto = async () => {
await this.askPermissionsAsync();
const result = await ImagePicker.launchCameraAsync({
allowsEditing: true,
aspect: [4, 3]
});
...
Asking for permissions returns:
p1: Object
expires :"never"
permissions : Object
status :"granted"
p2: Object
expires :"never"
permissions : Object
status :"denied"
Has someone else run across this?
Cheers // Kristofer