How do you request runtime permissions like camera or location, and what do you do when the user says no?
What the interviewer wants to hear
- Ask in context, at the moment the feature is used
- Explain the benefit first with a short pre-permission screen
- Declare purpose strings or manifest permissions
- Handle denial: keep the app usable and offer an alternative
- Guide to system settings when permanently denied
Model answer
I ask only when the user starts the feature that needs it, for example when they tap Scan, not at first launch. Before the system dialog, I show a short screen explaining why, because the system dialog can usually be shown only once or twice. I make sure the manifest entry or the Info.plist purpose string is there, since a missing purpose string crashes on iOS. If the user denies, the app must still work: I hide or disable the feature, or offer another way, like typing a code instead of scanning. If they denied permanently, I show a gentle message with a button that opens the app settings page. I also re-check the permission each time, because users can revoke it in settings at any moment.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Mobile App Developer questions
- What is the difference between native and cross-platform mobile development? When would you choose each?
- Explain the lifecycle of a mobile app screen. Why does it matter?
- How do you handle network calls and errors in a mobile app?
- What is MVVM and why is it used in mobile apps?
- How do push notifications work in a mobile app?
- How do you run slow work like network calls or database reads in a mobile app without freezing the UI?
- What options do you have for storing data on the device, and how do you choose between them?
- How do you make your app look good on different screen sizes, orientations and font sizes?
- What is the difference between declarative UI (Compose, SwiftUI, Flutter, React Native) and the older imperative style?