scratchjr/android/ScratchJr
Chris Garrity 1e3d468c33 Don’t export as email message, and be less strict about import requirements
Don’t export as email message. and be less strict about import requirements.

Android intent filters are really only designed to work with standard mimetypes (like ‘image/png’). Even if you can share something with a custom mime type, it’s likely to get lost somewhere along the way, from email, or Gdrive, or Files app etc.

Path matching patterns in intent filter only apply to `file` schemes, `content` scheme is likely to be some generated id in temp storage. `content` filters maintly go by mimetype, but as noted above, a custom mimetype has often gone AWOL. Generic application files are usually downloaded as `application/octet-stream`. Basically we have to trust the user not to try to load some other random file into ScratchJr. The import function will fail and give an error message if they do.

Finally, fix the way we’re sharing ScratchJr files. While the button says ‘Share by Email’ for a long time Android has shown a selection of ways to share the file. However, we were setting the mime type as an email message so the saved file would always try to open in an email client instead of ScratchJr.
2020-04-13 17:07:38 -04:00
..
.idea Add files to gitignore 2019-09-25 13:36:21 +01:00
app Don’t export as email message, and be less strict about import requirements 2020-04-13 17:07:38 -04:00
gradle/wrapper Update to gradle 5 and update support dependencies 2019-09-09 16:15:24 -04:00
.gitignore Updating .gitignore 2016-05-02 11:05:08 -04:00
build.gradle Switch to firebase analytics 2019-10-21 10:48:03 -04:00
gradle.properties Initial commit 2016-01-08 14:31:04 -05:00
gradlew Initial commit 2016-01-08 14:31:04 -05:00
gradlew.bat Initial commit 2016-01-08 14:31:04 -05:00
ScratchJr.iml Add files to gitignore 2019-09-25 13:36:21 +01:00
settings.gradle Initial commit 2016-01-08 14:31:04 -05:00