Open shripalsoni04 opened 7 years ago
I'd like to get permission requests added to the plugin for recording and then gracefully handling the promise. @shripalsoni04 - you want to work on a PR for this. For android we can include the dep. of nativescript-permissions
to keep it simple. Just a public method requestRecordingPermission
would be sufficient on android. I know iOS perms are different, you might be more familiar with the approach there 😄 . Let me know if you want to work on this and if you have any questions or need help.
First of all 👍 for this awesome plugin. Thanks for creating this.
I found that on iOS, if user deny the permission to record audio using microphone, the promise of
start
method is not getting resolved or rejected.It will be great if we can have some intimation if user has given permission or not, to take further actions.
I quickly looked into the code. I think it will satisfy this requirement if we just reject the promise if permission is denied as follows:
src/ios/recorder.ts
If there is already some way to get intimation that user has denied the permission, then please let me know. It will be very helpful to me.
Thanks.