Open msschwartz opened 1 week ago
Thank you @msschwartz! Yep, I overlooked this and we definitely need more granular permissions here in cases like this, as well as for troubleshooting permissions issues. I'll be able to review your PR later today but my initial impressions are:
requestMicrophonePermissionsAsync()
to request RECORD_AUDIO
permissions for Android and (maybe) suffix the method name for requestSpeechRecognizerPermissionsAsync()
with IOS
(if no other platform has an equivalent permission).requestPermissionsAsync
API around without the deprecation marker just so that it's the easy path for most (as Android only needs one permission).
If user is using the on-device recognition, we do not need to prompt the user for speech recognition permission.
This can be a show stopper on apps with sensitive data that users prefer to keep private.
A quick proof-of-concept PR has been created to show how this can be improved to separate the microphone permissions from speech recognizer permissions. https://github.com/jamsch/expo-speech-recognition/pull/55