-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requestMicrophoneAuthorization callback procs at wrong time #306
Comments
Found that you have to request the permission status again. The parameter given to the callback represents the status before user interaction. |
I've just investigated this and found that in the latest version of the plugin (v4.0.6), the success callback in being invoked correctly by To reproduce my test case, please do the following:
FYI: while looking into this, I discovered a typo in the JS layer of the microphone module for Android: |
Closed due to no response |
I need to be able to react to when a user allows or denies authorization. Callback function when a request is made is not useful. Cannot find a way to do this without setting a background timer to continuously check permission status.
Added directly using
cordova plugin add cordova.diagnostic.plugin
The callback is executing in parallel to the authorization request. Does not wait for user to "Allow" or "Deny" request.
cordova.plugins.diagnostic.requestMicrophoneAuthorization(function(status){
console.log(status);
});
status value is showing status before user presses a button
Also tried registerPermissionRequestCompleteHandler to no avail.
The text was updated successfully, but these errors were encountered: