-
Notifications
You must be signed in to change notification settings - Fork 424
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
open_file requires MANAGE_EXTERNAL_STORAGE which is considered Dangerous #265
Comments
i want to upload my app to the Play Store. what do I do? |
@aju-annaseem You need to remove MANAGE_EXTERNAL_STORAGE from your AndroidManifest, as well as the outdated permissions (read more here). You also need to target API 33. For that, I suggest you replace |
I am facing the same issue too |
I am facing this issue while trying to open the pdf file. Do we need to implement anything more from the following part?Open a file In these cases, allow the user to choose the file to open by invoking the ACTION_OPEN_DOCUMENT intent, which opens the system's file picker app. To show only the types of files that your app supports, specify a MIME type. Also, you can optionally specify the URI of the file that the file picker should display when it first loads by using the EXTRA_INITIAL_URI intent extra. The following code snippet shows how to create and invoke the intent for opening a PDF document:
Reference: https://developer.android.com/training/data-storage/shared/documents-files#open-file |
any update on this |
@Charlinjoeaht use open_fileX instead of open_file: https://pub.dev/packages/open_filex |
Hello,
As of Android api 33, the READ_STORAGE and WRITE_STORAGE autorisations have been depreciated. The Google PlayStore now requires app to target API 33 so this change must be addressed by all apps targetting production releases.
Issue
Running
OpenFile.open
fails on API 33. The new permission required by open_file is "MANAGE_EXTERNAL_STORAGE". The problem with that permission is that it's very powerful and considered dangerous by Google themselves. Users who want to submit an app to the Google PlayStore require a special autorisation to use it, and they need to fill a security form. That special application will be rejected if the permission is not required for the app to run in the first place, which is not the case of most apps.Solving the issue for no-prod
Using the package Permission_handleer, you need to ask permission to manage user's storage, here's the code:
When this returns true, you may try to run
OpenFile.open
and it will be fine.Solving the issue for prod
I do not have an answer for this pakcage, hence why I raise this issue.
The obvious solution would be that the package uses a lower permission or a workaround to open the file without using such a dangerous and highly regulated permission.
In the meanwhile, replace open_file by a fork of it, open_filex: https://pub.dev/packages/open_filex
Your need to straight out replace the package in the pubspec.yaml, but the calls are the same.
The text was updated successfully, but these errors were encountered: