For now, disable calls to `KMKeyboardDownloaderActivity.removeKEyboardDownloadEventListener()`. The parent activities will always pause when KMKeyboardDownloaderActivity runs, and we want the event handlers to trigger when the keyboards finish downloading.
Also fixed processing custom JSON to handle the JSONArray `languages`.
Currently in `KMManager`, there's 3 methods to download a `KMKeyboard` (2 in `KMKeyboardDownloader`, 1 in `KMCustomKeyboardDownloader`) for the 3 use-cases respectively:
1. Add new keyboard (from the cloud)
2. Update a keyboard
3. Install a custom keyboard
This PR refactors the following:
1. Code from `MainActivity.checkUrl()`, `KMManager.KMKeyboardDownloader()`, and `KMManager.CustomKeyboardDownloader()` into a new activity `KMKeyboardDownloadActivity`.
Code for doing actual file downloads are kept in an `AsyncTask`.
2. `FileDownloader` moved to a separate util class.
3. Confirmation dialogs for downloading keyboards are also refactored into `ConfirmDialogFragment`.
At the moment, the keboard API isn't publishing the packageID, so using "cloud" as an in-term packageID.
As a result, keyboards get downloaded to /packages/cloud/
By design, kmp keyboards will unzip into /packages/packageID folders.
1. Moving default eurolatin2 keyboard assets
2. Move old keyboards to new packages structure
Per Android Studio 3.0 [Release Notes](https://android-developers.googleblog.com/2017/10/android-studio-30.html)
-Update gradle version
-Change deprecated `compile` dependencies to `implementation` or `api`
-Change maven repositories to google (triplet plugin still on maven)
- Update readme instructions for using the engine
n trying to build Keyman for Android on Linux, the following issues needed to be fixed:
Set `build.sh` and `gradlew` scripts to executable
KMEA/build.sh needs an OS check so build.bat is only called on Windows
web/source/build.sh needs $compiler and $copmiler_warnings values in quotes