Skip to content

v2.2.2

Choose a tag to compare

@vietnguyentuan2019 vietnguyentuan2019 released this 26 Jun 18:38

πŸ› 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-persisted shouldShowRequestPermissionRationale() 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 (file grant_request_history), so a permanent denial is recovered after a restart and correctly reported as DENIED_ALWAYS (routing to Settings) instead of NOT_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())

See GrantStore Architecture.

πŸ“– Docs


Full Changelog: v2.2.1...v2.2.2