scratchfoundation / scratchjr

With ScratchJr, young children (ages 5-7) can program their own interactive stories and games.
http://www.scratchjr.org
BSD 3-Clause "New" or "Revised" License
684 stars 319 forks source link

Add import function to ScratchJr #258

Closed chrisgarrity closed 2 years ago

chrisgarrity commented 4 years ago

On many Android systems, the intent-filter system means that people can't open a ScratchJr file because Android says they don't have anything that can open it even when ScratchJr is installed. And there is no workaround.

Instead, let's just add an import function that would let the user select a file to import, from downloads, drive, etc. It should probably be similar to what we have in the scratch-android project. I'm not sure it's as big an issue on iOS, but probably should work the same way.

More details about why:

Basically, it's impossible to register an app on Android to handle a custom mime-type. It is possible to define a pattern (e.g. file extension) to read a file. But that only works with downloaded files that have the proper naming. Something attached to an email, or coming from another app like Google Drive, looks only at the mime-type, and the content path is unlikely to have the right name. Depending on your version of Android, you may have a way to browse files, or you may have an app which makes it look like a content stream.

Using the Android intent-filter mechanism the only thing to do is basically say you can open everything, and then deal with errors. Given Android's preference for setting an app as the default when you use it to open anything, that could lead to ScratchJr being considered the default app for a lot of different types, also not ideal.

chrisgarrity commented 4 years ago

The simplest thing to do is mimic what the Scratch app does - add an import button in the lobby that opens the standard Android file browser. It lets the user select any file, and then just ignores any that aren't readable with a message. Does that interaction make sense for a 5-7 year old. How comfortable will they be selecting a file? Navigating to the Downloads folder, or perhaps a cloud drive? This feels more like a parent function that we may want to hide from the children.

benjiwheeler commented 4 years ago

There was a design discussion about this that surfaced some observations and questions:

We agreed to check back in at a later date, after the Sept/Oct 2020 ScratchJr update is released.

benjiwheeler commented 4 years ago

Next step on this: just the first bullet from above, researching into app store policies around importing files

Idea is not to complete this issue right now, but to leave it in a well-scoped state so it can be understood, scheduled, and worked on later.

benjiwheeler commented 4 years ago

Update:

== Android

Relevant sections of the guidelines:

https://support.google.com/googleplay/android-developer/answer/9893335

App content: Your app's content that is accessible to children must be appropriate for children.

You must accurately disclose the app's interactive elements on the Content Rating Questionnaire in the Google Play Console, including whether... users can interact or exchange information

I think it is likely that an import function is well within the relevant guidelines. It may be possible that adding a parental gate before import might make it even more clear that imported content is being supervised by an adult.

== iOS

This is not as relevant because we are not currently proposing to allow import on iOS. But for future reference:

Looking at the ios app store guidelines, it seems to me that there is no problem around allowing the import of files. However, depending on your interpretation, it might be necessary to add a "parental gate" before importing:

The App Store Review Guidelines require apps in the Kids category to use parental gates to prevent kids from engaging in commerce or following links out of an app to websites, social networks, or other apps without the knowledge of their parent or guardian. -https://developer.apple.com/app-store/kids-apps/

Relevant sections of the guidelines: https://developer.apple.com/app-store/review/guidelines/#1.3 , https://developer.apple.com/app-store/review/guidelines/#5.1.4

benjiwheeler commented 3 years ago

Removed milestone, because we're not sure when this work will/should be prioritized

deepankarmalhan commented 2 years ago

Closing this, it will get tracked in epic created in #460