Open zeckdude opened 6 years ago
https://github.com/expo/expo/issues/1707
`import {ImagePicker, Permissions} from 'expo';
askPermissionsAsync = async () => { await Permissions.askAsync(Permissions.CAMERA); await Permissions.askAsync(Permissions.CAMERA_ROLL);
};
//打开照相机 useCameraHandler = async () => {
await this.askPermissionsAsync();
let result = await ImagePicker.launchCameraAsync({
// allowsEditing: true,
aspect: [1, 1],
base64: false,
});
if (!result.cancelled) {
}
};
<Button onClick={ this.useCameraHandler }>拍照`
Is there some code missing in the example? When I start the expo app for this project, it shows the buttons but when you tap on either one, it shows the following message:
Is there some code missing that should be asking the user for permission to access the camera/camera roll before taking/picking a photo?