When a user selects 'Only this time' for an Android location permission request, what behavior should the developer expect?
- A.'Only this time' grants permanent access that the user must manually revoke
- B.'Only this time' grants access for 24 hours then auto-revokes
- C.The permission is granted only for the current app session; when the app is closed and restarted, the permission is revoked and must be requested again, providing one-time access similar to iOS
- D.'Only this time' grants precise location even if the user would normally only approve approximate location
Why C is correct
Android 11 introduced 'Only this time' for one-time permission grants (location, camera, microphone). When the app is no longer visible or is closed, the permission is automatically revoked. Apps must handle the case where the permission is not available on next launch and request it again if needed. This aligns Android behavior closer to iOS's one-time permission option.
Know someone studying for Mobile Security Fundamentals? Send them this one.