-
Notifications
You must be signed in to change notification settings - Fork 12
File permission settings #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@Irtesaam is this fine |
|
@FireFistisDead |
|
@Irtesaam can you tell me your android version? |
|
@Irtesaam if possible can you once check with versions less than 13 so that i could figure out what exactly the problem is |
|
because i have android version 8 and 11 available for now |
You can use emulator for that. When creating a new virtual device, you’ll get options to choose different Android versions—just pick 11 & 13 and test on both of them. |
|
@FireFistisDead Also refer to your commit |
yeah i was refering to that only now ig i got the problem |
the problem is i dont have a high specs pc so i do in physical device |
|
@Irtesaam |
|
@Irtesaam https://stackoverflow.com/questions/72948052/android-13-read-external-storage-permission-still-usable |
@FireFistisDead Yah it was asking for both. So for android 13, it would require both permissions to work ? |
|
@Irtesaam no it wont fix it according to the blogs and documentaton there is no direct function to ask for the file permission in the android versions >=13 we have to verify it from google play there is a process for that |
|
for now i am thinking what we can do for quick action |
yeah i have already fixed it in my recent changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FireFistisDead You're right. I just tested it, and it seems the current code is only working for Android <13. For Android 13+, the storage permission is causing issue.
I'm merging the changes for now and will look into updating the permission logic to support the newer Android versions (if possible).
|
@Irtesaam i just read some documentation and surfed online i have come up with an idea like this issue is because of the android version so i am thinking that rather than taking permission from the user to store data we can directly prompt the user that where the user wants to store the data just like when we are importing schedule from the csv in that user selects from where he wants to import the data just like that we will ask the user where he wants to store the data
|
|
@FireFistisDead This seems like a good idea but will it work without any permission given in the first place? If it can, then code it up and raise a PR. I will look into it. |
|
@Irtesaam yeah i will try it if it works or not |
Fixes #127
Closes #127
Description
This pull request introduces a comprehensive update to how storage permissions are handled in the app, ensuring compatibility and security across different Android versions and iOS. The main changes include refactoring permission logic to use the
react-native-permissionslibrary, updating Android manifest permissions, and centralizing permission checks to improve maintainability and user experience.Permissions Handling Improvements:
PermissionsHelperclass, which leverages thereact-native-permissionslibrary for consistent permission handling across Android and iOS. This includes both requesting and checking permissions, and providing user-friendly dialogs for permission explanations and denials. (src/utils/permissions.ts,src/utils/exportSchedule.ts, [1] [2] [3] [4]requestStoragePermissionfor easy permission requests throughout the app. (src/utils/storage-permissions.ts, src/utils/storage-permissions.tsR1-R6)Android Manifest and File Provider Updates:
AndroidManifest.xmlto declare all necessary storage permissions for different Android versions, includingREAD_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE, andMANAGE_EXTERNAL_STORAGE, and added aFileProviderfor secure file sharing and CSV export/import. (android/app/src/main/AndroidManifest.xml, [1] [2]file_paths.xmlresource to support the FileProvider configuration for external file access. (android/app/src/main/res/xml/file_paths.xml, android/app/src/main/res/xml/file_paths.xmlR1-R4)App Initialization and Permission Requests:
App.tsx, [1] [2]Dependency Management:
react-native-permissionslibrary topackage.jsonto support the new permission handling approach. (package.json, package.jsonR38)These changes collectively modernize and streamline the app’s storage permission workflow, improving reliability and user experience across platforms.
Files Changed
Screenshots/Videos
GSSoC Contributor
Testing Device