v2.2.2
π Fixed β Android permission request swallowed after app restart (#55)
After denying a permission and restarting the app, the first request tap could silently do nothing instead of showing the rationale (soft denial) or the settings guide (permanent denial). Two root causes were fixed:
checkStatus()now consults the OS-persistedshouldShowRequestPermissionRationale()flag before the in-memory request history, so a soft denial is recovered after a restart.- The request history itself is now persisted on Android via the new
SharedPreferencesGrantStore(filegrant_request_history), so a permanent denial is recovered after a restart and correctly reported asDENIED_ALWAYS(routing to Settings) instead ofNOT_DETERMINED.
Verified on a physical Pixel 6 Pro (Android 16) for both soft and permanent denial after kill + restart.
β οΈ Behavior change (Android)
SharedPreferencesGrantStore is now the default GrantStore on Android (iOS remains InMemoryGrantStore). It persists only the immutable "has been requested" fact β never the permission status, which is always re-read from the OS β so there is no state desync. The backing file is excluded from backup and device-to-device transfer, so fresh installs start clean.
Opt back into the old in-memory behavior with:
GrantFactory.create(context, store = InMemoryGrantStore())π Docs
- New recipe: Skip the Prompt When Already Granted β observe
GrantHandler.statusto go straight to the feature without re-prompting.
Full Changelog: v2.2.1...v2.2.2