Refactor the native interface in preparation for switching iOS to use WKWebview.
* Finally rename the folder for device specific interfaces as `tablet` instead of `iPad`
* Update `import` statements to use the new name
* Create new `iOS.js` and `Android.js` based on previous `iPad/iOS.js` to separate the interfaces
* Add new `OS.js` class to manage the class variables, initialize the device interface delegate methods to the correct interface.
* refactor how `utils/lib` detects the current platform based on `navigtor.userAgent` based on https://stackoverflow.com/questions/37591279/detect-if-user-is-using-webview-for-android-ios-or-a-regular-browser. previous method relied on the Android interface being loaded or not. It can be difficult to detect the difference between in a browser and in a webview, but for now ScratchJr doesn’t need to worry about running in a browser
Fixes#217
Testing:
- verify still works on Android
- check anywhere that could scroll:
- character or backdrop library
- projects in lobby
- help documentation
- blocks pallette
-
On some newer android devices the screen tranform matrix already includes the current scale. i.e. the matrix looks like:
```
{
a: scaleX,
b: 0,
c: 0,
d: scaleY,
e: offsetX,
f: offsetY
}
```
where both `scaleX`, and `scaleY` are the current zoom. On other devices the scale is always `1`, and we need to apply our own scaling.
I also added the code to automatically allow webview debgging if the buildType is debuggable. Also, note that you can switch which line is commented out in bundle-compile.sh to get unobfuscated javascript.
There was only one paint editor event and it only distig,nuished between character or background. This change distinguishes between editing a background from the library vs user-created. For characters it distinguishes between new and edit, and between library assets or user-created.
* Pass value `0` for email analytics event (everything was being reported as airdrop even when it was email)
* Use `id` for assets (corresponds to the asset file name, e.g. Star.svg) instead of `fieldname` which is localized.
* Remove ScratchJrApplication class - it was only being used to initialize the old Google Analytics.
* Change AppUsage (home, school, other, noanswer) from being a prefix on `label` to being a Firebase user property.
* Set the user property when loading the index page - it shouldn’t change for the rest of the session.