Skip to content

Conversation

@FireFistisDead
Copy link
Contributor

Fixes

Closes #127

Description

This pull request introduces improvements to how storage permissions are handled in the Android app, refactors permission logic for better maintainability, and updates build configuration. The main changes include switching to a centralized permissions helper, updating Android manifest permissions, and modifying the NDK version in the build configuration.

Permissions handling and refactoring:

  • Replaced manual storage permission request logic in ExportScheduleUtility with a call to PermissionsHelper.requestStoragePermission, ensuring consistent permission management across the app (src/utils/exportSchedule.ts).
  • Added a new utility function requestStoragePermission in src/utils/storage-permissions.ts that delegates permission handling to PermissionsHelper for easier reuse and testing.
  • Imported PermissionsHelper into exportSchedule.ts for centralized permission logic.

Android configuration:

  • Added android.permission.WRITE_EXTERNAL_STORAGE to AndroidManifest.xml to explicitly request storage access on Android devices.
  • Updated the NDK version in android/build.gradle from 27.1.12297006 to 26.3.11579264 for compatibility or build stability.

Files Changed

GSSoC Contributor

  • Yes, I am a GSSoC contributor

Testing Device

  • Physical Android Device

@FireFistisDead
Copy link
Contributor Author

@Irtesaam can you check now i have implemented this in my emulator as well as 2 other phones and it is asking for the storage permission

@FireFistisDead
Copy link
Contributor Author

Dont merge it now i have to make minor changes

Copy link
Collaborator

@Irtesaam Irtesaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FireFistisDead The current logic is flawed as app continues to save files to the Downloads directory even after storage permission has been denied. This behavior violates user privacy so fix it ASAP.
Also, why was access to music and audio added? Any app features actually using this permission?

@FireFistisDead
Copy link
Contributor Author

@Irtesaam no review it previous commits were just my fault
WhatsApp Image 2025-08-16 at 23 56 26_7bdfa3cd
WhatsApp Image 2025-08-16 at 23 56 37_433c90e9

@FireFistisDead
Copy link
Contributor Author

When Permission given

WhatsApp.Video.2025-08-16.at.23.56.36_c7f269be.mp4

@FireFistisDead
Copy link
Contributor Author

When Permission is not given

permission_not_given.mp4

@Irtesaam fixeeed this flaw

Copy link
Collaborator

@Irtesaam Irtesaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No permissions requested is showing up now. Fix this issue.

Your changes are too bloated. Please create a new PR with only the necessary and correct changes. Also, remove unused sections instead of commenting them out. Closing this PR.

@Irtesaam Irtesaam closed this Aug 16, 2025
@Irtesaam Irtesaam mentioned this pull request Aug 16, 2025
2 tasks
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.

Fix storage permission denied error

2 participants