-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Check Storage Permission Before Upload #15240
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
base: master
Are you sure you want to change the base?
Conversation
38a609b
to
92df4ea
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Looks like full file access permission fixed the issue, please read the issue and comments. #15039 (comment) |
92df4ea
to
d446815
Compare
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
d83b4f9
to
b7be9b8
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15240.apk |
.setAutoCancel(true) | ||
|
||
ContextCompat.getSystemService(context, NotificationManager::class.java)?.run { | ||
notify(MISSING_FILE_PERMISSION_NOTIFICATION_ID, notificationBuilder.build()) |
Check failure
Code scanning / CodeQL
Use of implicit PendingIntents High
An implicit Intent is created
Copilot Autofix
AI about 4 hours ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
Issue
Previously granted
MANAGE_EXTERNAL_STORAGE
orOnly Media Access
permission can be revoked if the app hasn't been used for a few months (e.g. if user not opens the app just using the app for auto upload) or after a system upgrade.Some other OS implementations may handle this differently, so we need to cover this edge case as well.
Also, it seems that some users have experienced this issue before and resolved it by re-granting the permission.
#15218 (comment)
#15039 (comment)
Changes
Notes
PermissionUtil.requestExternalStoragePermission
cannot be used to display the same permission dialog that appears at the beginning of the application, as it depends onAppCompatActivity
. Therefore, we inform the user and provide them with the option to choose between the standard app permission or full file access.@ZetaTom
Additionally, instead of handling the error after a failed upload, we proactively check for the necessary permissions before initiating the upload. This approach prevents unnecessary calls and simplifies the logic flow.
All files access action
App permissions action
We cannot redirect to the directly to the storage permission page. There is no intent action for that.