Sparround

Permissions and device capabilities

Capabilities like the camera, location, notifications, files and the microphone require user permission. The flow has three stages and all three must be handled:

  • Check — is permission already granted
  • Request — show the system dialog
  • Handle refusal — the user can say no, and can even choose "don't ask again"

That last case is the one most often forgotten: in a permanently-denied state the dialog never appears again, and the only route left is sending the user to system settings.

StateMeaningCorrect behaviour
grantedPermission grantedProceed with the feature
deniedRefused, but you may ask againExplain why it is needed and ask again
permanentlyDeniedThe user chose not to be asked againShow a button that opens system settings
restrictedBlocked by device policy such as parental controlsOffer an alternative; do not keep asking

Interview tip. Here the UX matters as much as the API: showing the system dialog out of context, right at launch is the worst practice — most users refuse reflexively and you never get to ask again. The right approach is asking at the moment of need, with a short rationale first ("we need camera access to scan the document"). That is the pre-permission pattern, and it lifts acceptance rates substantially.

📚 Sources and documentation