Skip to content
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

[BUG] Filesaver on Android requires WRITE_EXTERNAL_STORAGE permission, but since API level 33 it could not be requested #1146

Closed
2 tasks done
IvanMi773 opened this issue Apr 19, 2023 · 3 comments
Labels
bug Something isn't working unverified

Comments

@IvanMi773
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

For Android MAUI projects targeting API level 33 it is impossible to request READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions (see Android documentation:

Note: If your app targets Build.VERSION_CODES.R or higher, this permission has no effect.

). And if user is trying to store some file the PermissionException is throwing

Expected Behavior

Filesaver should not require WRITE_EXTERNAL_STORAGE permission and PermissionException should not be thrown for the projects which targeting API level 33

Steps To Reproduce

  1. Run solution from reproduction repository which is targeting API level 33

  2. See that modal window with requesting storage permissions is not showing

  3. Click on Store file button. See in output that PermissionException is throwing

  4. Change target API level to 32 in AndroidManifest.xml

  5. Rerun app and see that modal window with requesting storage permissions is showing

  6. After click on button file picker is opened

Link to public reproduction project repository

https://gitlab.com/IvanMi773/maui-filesaver-bug-reproduction/-/tree/main/

Environment

- .NET MAUI CommunityToolkit: 5.1.0
- OS: Windows 10
- .NET MAUI: 7.0.200

Anything else?

No response

@IvanMi773 IvanMi773 added bug Something isn't working unverified labels Apr 19, 2023
@IvanMi773 IvanMi773 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
FrietStoofvlees added a commit to FrietStoofvlees/ProjectNASA that referenced this issue Apr 20, 2023
@baaaaif
Copy link

baaaaif commented Jun 7, 2023

@IvanMi773
Is there a reason you closed the ticket right away?
I have the same problem - do you have a workaround for this (with target API 33)? My only solution at the moment would be to use the Maui share instead of FileSaver

https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/data/share?tabs=android#share-a-file

@lochidev
Copy link

lochidev commented Jul 1, 2023

still having this issue

@CobaltGoldCS
Copy link

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

4 participants