Open leshik opened 5 years ago
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
hasPermission()
Not sure how this should be fixed – hasPermission and requestPermission share most of the code, maybe this should go in a separate function.
hasPermission
requestPermission
Turned out Android suffers from same issues. I added another PR #91 to fix them.
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#L189Not sure how this should be fixed –
hasPermission
andrequestPermission
share most of the code, maybe this should go in a separate function.