Skip to content

Fix storage permission requests and lifecycle handling - #140

Closed
PatrickJanzen wants to merge 1 commit into
Waterdish:mainfrom
PatrickJanzen:fix-storage-permissions
Closed

PatrickJanzen wants to merge 1 commit into
Waterdish:mainfrom
PatrickJanzen:fix-storage-permissions

Conversation

@PatrickJanzen

Copy link
Copy Markdown
  • Call super.onCreate() before requesting permissions or setting up UI
  • Add fallback to ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION for Android 11+
  • Implement onRequestPermissionsResult in MainActivity for Android 6-10
  • Re-check permissions on onResume() if user granted permissions in Settings
  • Guard file setup with AtomicBoolean to prevent race conditions or duplicate runs
  • Add requestLegacyExternalStorage to AndroidManifest for Android 10 support
  • Bump compileSdkVersion to 33 to match targetSdkVersion 33

- Call super.onCreate() before requesting permissions or setting up UI
- Add fallback to ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION for Android 11+
- Implement onRequestPermissionsResult in MainActivity for Android 6-10
- Re-check permissions on onResume() if user granted permissions in Settings
- Guard file setup with AtomicBoolean to prevent race conditions or duplicate runs
- Add requestLegacyExternalStorage to AndroidManifest for Android 10 support
- Bump compileSdkVersion to 33 to match targetSdkVersion 33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant