Running SDK 31
I am using the Camera API: https://docs.expo.io/versions/v30.0.0/sdk/camera
I call takePictureAsync but onPictureSaved function I have is not being called on Android.
It is being called on iOS.
if (this.camera) {
await this.camera.takePictureAsync({onPictureSaved: this.onPictureSaved});
this.camera.pausePreview();
}
Hey @rshellborn ,
Thanks for providing us with a Snack. Going to see if we can reproduce this on our end. Could you also let me know what device you’ve reproduced this behavior on?
Cheers,
Adam
Samsung Galaxy S6
FYI I ask for camera permissions before using the component in the snack
async _checkCameraRollPerms() {
Keyboard.dismiss();
const {status} = await Permissions.getAsync(Permissions.CAMERA_ROLL, Permissions.CAMERA);
if(status === 'granted') {
this._displayPhotoOptions();
} else {
const {status} = await Permissions.askAsync(Permissions.CAMERA_ROLL, Permissions.CAMERA);
if (status === 'granted') {
this._displayPhotoOptions();
} else {
Alert.alert(
I18n.t('cameraDeniedTitle'),
I18n.t('cameraDeniedDescription'),
[
{text: 'OK', onPress: () => {}}
],
{ cancelable: false }
)
}
}
}
system
Closed
December 20, 2018, 7:25pm
5
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.