Overhaul file handling and sharing badges #966
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
*_EXTERNAL_STORAGE is deprecated and non-functional in Android 13+. There really isn't any reason to use external storage for the badges and cliparts anyways. This commit changes Badge Magic to use app-internal internal storage that can be freely accessed without requiring permissions. This fixes badge saving on Android 13+.
Sharing badges has been slightly improved: Many apps don't read the EXTRA_STREAM property, even if a valid (and readable) URI is provided there. The EXTRA_TEXT property shouldn't contain a description, like was done before, but the actual text content of the file. This is now what badge sharing does, allowing text content of badges to be shared to many more apps. Additionally, the MIME type "text/*" doesn't really exist, so text/plain is used instead, though this could be changed to text/json.
Unfortunately, this change resets all saved cliparts and badges of the user. Since they have previously been saved in external storage, it should be feasible to import at least all the old badges. Once importing cliparts becomes possible, the first issue will be solved as well.