Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Bug: hasPermission() always results in success on iOS #89

Open
leshik opened this issue Oct 18, 2018 · 1 comment · May be fixed by #90
Open

Bug: hasPermission() always results in success on iOS #89

leshik opened this issue Oct 18, 2018 · 1 comment · May be fixed by #90

Comments

@leshik
Copy link

leshik commented Oct 18, 2018

When on iOS, hasPermission() always returns success, even if a user has denied the request to the speech recognition before. I think the cause is this line: https://github.com/pbakondy/cordova-plugin-speechrecognition/blob/master/src/ios/SpeechRecognition.m#L189

Not sure how this should be fixed – hasPermission and requestPermission share most of the code, maybe this should go in a separate function.

leshik added a commit to leshik/cordova-plugin-speechrecognition that referenced this issue Oct 19, 2018
- Use `[AVAudioSession sharedInstance] recordPermission` to check mic permissions

Closes pbakondy#89
@leshik leshik linked a pull request Oct 19, 2018 that will close this issue
leshik added a commit to leshik/cordova-plugin-speechrecognition that referenced this issue Oct 20, 2018
- Use `[AVAudioSession sharedInstance] recordPermission` to check mic permissions

Closes pbakondy#89
@leshik
Copy link
Author

leshik commented Oct 20, 2018

Turned out Android suffers from same issues. I added another PR #91 to fix them.

leshik added a commit to leshik/cordova-plugin-speechrecognition that referenced this issue Oct 20, 2018
- Use `[AVAudioSession sharedInstance] recordPermission` to check mic permissions

Closes pbakondy#89
leshik added a commit to leshik/cordova-plugin-speechrecognition that referenced this issue Mar 28, 2019
- Use `[AVAudioSession sharedInstance] recordPermission` to check mic permissions

Closes pbakondy#89
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant