-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add permanent file saving strategy for Android
Recap: The MAUI community toolkit filesaver requires direct file system access which has been disallowed in Android 13 (API 33) beyond a handful of media folders (Photos, Videos, Music) OR if your app requests the high risk permission that google requires you to justify. I stuck a workaround in to forcibly target a lower framework version but as of late August google stopped anyone publishing updates using that workaround (which I knew was coming). After months waiting and googling, it appears that the Storage Access Framework is already readily available using the [Share Api](https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/data/share?tabs=android#share-a-file) That was very frustrating to find out or search for. I'm still utilising the community toolkit file saver on other platforms but since Android only allows media folder access it makes sense to save "Documents" using the Storage Access Framework so that users can effectively "share" the file with another app (like Google Drive, Gmail or a file manager) in order to more natively "Save" their data somewhere else. What a pain.
- Loading branch information
Showing
3 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
</manifest> |