Hello !
I have troubles having audio permissions to work on android. It works fine in expo go, but not in android.
In the given code, the permission for the camera is asked properly, but when accepted the permission for audio shows only for a fraction of a second and return a not granted status.
Once again, it works fine in expo go.
Is there anything i’m doing wrong ? do you have an idea on how to solve this ?
Thanks you very much community !
- SDK Version: 41
- Platforms(Android/iOS/web/all): Android (samsung A20e)
import {Camera} from 'expo-camera'
import {Audio} from 'expo-av';
export default () => {
return (
<View>
<Button onPress={() => {
Camera.requestPermissionsAsync().then(status => {
// audio permission request is only shown for half a second in build mode and is automatically denied permission
Audio.requestPermissionsAsync().then(status => {
console.log('ok');
});
});
}}>Test</Button>
</View>
);