Skip to content

Implement enhanced permission handling for photo/video access#21

Merged
Android-PowerUser merged 1 commit intoBetter_textfrom
update-permission-handling
May 25, 2025
Merged

Implement enhanced permission handling for photo/video access#21
Android-PowerUser merged 1 commit intoBetter_textfrom
update-permission-handling

Conversation

@Android-PowerUser
Copy link
Owner

This commit introduces a more user-friendly permission request flow in MainActivity.kt as per the issue requirements:

  • Displays a rationale dialog explaining the need for photo and video permissions before the system permission request is shown.
  • If permissions are denied, the rationale is shown a second time, followed by another permission request.
  • If permissions are denied twice, the app displays a toast message "Without this authorization, operation is not possible." and then closes.
  • State variables showPermissionRationaleDialog and permissionRequestCount were added to manage this flow.
  • The PermissionRationaleDialog composable was created for the explanation.
  • checkAndRequestPermissions() and the requestPermissionLauncher callback were modified to implement this logic.

This commit introduces a more user-friendly permission request flow
in MainActivity.kt as per the issue requirements:

- Displays a rationale dialog explaining the need for photo and video
  permissions before the system permission request is shown.
- If permissions are denied, the rationale is shown a second time,
  followed by another permission request.
- If permissions are denied twice, the app displays a toast message
  "Without this authorization, operation is not possible." and then closes.
- State variables `showPermissionRationaleDialog` and `permissionRequestCount`
  were added to manage this flow.
- The `PermissionRationaleDialog` composable was created for the
  explanation.
- `checkAndRequestPermissions()` and the `requestPermissionLauncher` callback
  were modified to implement this logic.
@Android-PowerUser Android-PowerUser merged commit 9230060 into Better_text May 25, 2025
1 check passed
@Android-PowerUser Android-PowerUser deleted the update-permission-handling branch May 25, 2025 14:13
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