scratchjr/android/ScratchJr/app
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
..
src Don’t export as email message, and be less strict about import requirements 2020-04-13 17:07:38 -04:00
.gitignore Spanish translation refresh + git ignore change 2016-01-13 13:53:05 -05:00
build.gradle Add checks for filetype, skip unnecessary FileIO 2020-04-07 14:56:26 -04:00
proguard-rules.pro Initial commit 2016-01-08 14:31:04 -05:00