tchvu3 / capacitor-voice-recorder

Capacitor plugin for voice recording
69 stars 57 forks source link

How to difference permission state "prompt" from "denied" #35

Open fjc2112 opened 1 year ago

fjc2112 commented 1 year ago

The permission check method returns true or false, but false could be "prompt" when permissions have not yet been requested or "denied" when the user has denied them. How can they be differentiated?

qmarcos commented 2 months ago

I think there is no way to know if the false comes from the user current interaction with the permissions dialog or if it comes from a previous interaction (with the provided methods). Also I think there is no way to force to prompt the dialog again (this is the common OS behaviour I think).

Anyway, the result is the same so maybe you don't need to know how the user comes to this situation. At the end, you need to inform the user to allow the microphone manually from app OS settings to be able to use the "app feature" which uses the microphone.