-
-
Notifications
You must be signed in to change notification settings - Fork 846
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug
Do not ask again should returns blocked
value if it is selected, but returns denied
instead.
Environment info
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
Library version: ^2.0.9
Describe what you expected to happen:
- Asking Android's permission to use the Microphone.
- Select do not ask me again and then refuse, which is the only option left.
- check(permission) should return
Blocked
but returnsDenied
Reproducible sample code
const toggleRecording = async () => {
if (recording) {
return setRecording(!recording)
}
const permission = await check(permissionPerPlatform)
if (permission === RESULTS.DENIED) {
return askRecordAudioPermission();
}
if (permission === RESULTS.BLOCKED) {
return (
Alert.alert(
I18n.t("sharedMessaging.audio.permissions.title"),
I18n.t("sharedMessaging.audio.permissions.text"),
[
{ text: I18n.t("sharedMessaging.audio.permissions.action") },
],
{ cancelable: false },
)
);
}
setRecording(!recording)
};
const askRecordAudioPermission = async () => await request(permissionPerPlatform);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working