Similar to #3412
1. Adds a similar script from Windows to identify unused Android strings (from KMAPro and KMEA strings.xml)
2. Remove the unused strings from strings.xml
As part of the manual cleanup, consolidated the strings `missing_metadata` and `invalid_metadata`.
Also changed string name `model` to a more specific `model_label`
Now that api.keyman-staging.com is available, this updates the cloud queries to use the applicable api.keyman.com site depending n the tier.
* Change from `KMKeyboardDownloaderActivity.kKeymanApiModelURL` to `CloudRepository.API_MODEL_FORMATSTR`
* Change from `KMKeyboardDownloaderActivity.kKeymanApiPackageVersionURL` to `CloudRepository.API_PACKAGE_VERSION_FORMATSTR`
* Use URI to handle query parameters instead of strings
Also in resuming work on the PR
* Change the staging host to keyman-staging.com
* Move helper for determining host
Address some review comments:
* Update intent filter to use /keyboards/install (/go/packge/download commented out)
* Add some test cases to for testing Keyman install link
* Add intent to handle download links from current live site: https://keyman.com/keyboard/download/
* Fix parsing of bcp47 query
* Only use the path for determining filename from packageID
*
* Update FV build to download nrc.str.sencoten.model.kmp
* Update FV app to install the model
* Rebuild active keyboards list using keyboard info from kmp.json
getDefaultKeyboard()
* Assert `context`is not null
setDefaultKeyboard()
* Allow null Keyboard to revert to sil_euro_latin
FV MainActivity
* Define constant for default package ID
The FV Android app has a workflow where it's possible on a fresh install for the user to set FV as a system keyboard before checking (adding) any of the FV keyboards.
This makes the keyboard list empty, and KMManager throws an exception trying to set a keyboard.
This PR adds `Keyboard.setDefaultKeyboard()` so an app can specify a fallback keyboard. If never set, KMEA uses sil_euro_latin/sil_euro_latin.
The FV app will fall back to fv_all/sil_euro_latin
Per review comment, make logger `LogExceptionWithData` to handle generic Object. This will print out the object as a string in the error log to Sentry.
Similar to the OEM FirstVoices Android app, this updates the KMAPro `build.sh` script to download the latest default language resources (keyboard and dictionary) as part of the build process.