This PR was 95% of the way there, and I didn’t want to ask for changes after not getting to review it for so long, so I just made the changes.
Thanks for submitting!
Added instructions to the README for how to get the google services configuration files for analytics. Removed (and ignored in future) the empty config files. Note: empty folders are ignored in git, so added an empty file `.exist` to the android folder so that it will be there as a place to hold the actual google services file.
Finally added the xCode scheme for the app that you need for newer versions of xCode.
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.
The iOS change seems to have a side effect on Android of adding an“Edge Effect” to the web view whenever dragging a block. (Edge effects are the grey curved shadow that appears at the top or bottom of a container when you overscroll. When you drag a block they appear at the top or bottom of the screen)
Adding the `android:overScrollMode=“never”` attribute to the webview means the edge effect doesn’t appear.
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.
I also decided to add the Pods directory to gitignore. It bloats the ScratchJr repo. This does mean that people will need to install cocoapods and run `pod install` the first time they build scratchjr.
* 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.