chore(android): remove doc for non-existing deprecated functions
Several functions got deprecated in Keyman 14 and replaced with a function with same name and parameters but different return type. The original function no longer exists. This change removes the documentation for those no longer existing deprecated functions.
Also update the documentation for two deprecated functions to show what should be used instead.
chore(android): cleanup font variable names, remove obsolete code
This change renames the font variable names so that they match the two conceptual fonts we have. Also remove obsolete code that dealt with the `font` parameter being a JSON object instead of a string containing the font filename. Having the `font` parameter containing a JSON object was legacy code that won't happen with current Keyman versions.
Follow-up-of: #16188
Several functions got deprecated and replaced with a function with
same name and parameters but different return type. The original
function no longer exists. This change removes the documentation for
those no longer existing deprecated functions.
Also update the documentation for two deprecated functions to show what
should be used instead.
Build-bot: skip
Test-bot: skip
chore(android): log legacy cloud keyboards
This adds a Sentry log if a user is still using legacy cloud keyboards. We do this so that we will learn if there are still users out there or if we can remove the code that deals with those keyboards.
Reverts part of commit d0e1649630 until we know
if there are still users out there that are using legacy cloud keyboards.
See #16237.
Build-bot: skip build:android
This adds a Sentry log if a user is still using legacy cloud keyboards.
We do this so that we will learn if there are still users out there
or if we can remove the code that deals with those keyboards.
Test-bot: skip
* Specify clearer filenames for Android samples and test KeyboardHarness
* Cleanup android/*/build.sh to match current patterns
* Remove obsolete jcenter dependency
* Export BUILDER_CONFIGURATION in builder.inc.sh
Fixes: #16137Fixes: #16181
Test-bot: skip
Build-bot: skip release:android
* Remove irrelevant context from toast and add more context for Sentry
report.
* Add a test keyboard with a script error that will trigger the toast on
first keystroke.
* Rearrange common/test/keyboards/invalid to make a good place for
compiled invalid keyboards.
Fixes: #16145
Test-bot: skip
fix(android): add permissions for Sentry and set default keyboard
This change fixes two problems that cause a script error in the sample apps:
- add internet access permissions so that the Sentry server can be reached
- explicitly set the default keyboard since sil_euro_latin keyboard is not included in the sample apps. This works around #16215.
Fixes: #16180
This is consistent with other version variables in build.gradle.
Encountered an issue with loading TIER.md with Android Studio Quail 1 |
2026.1.1 Patch 2 version, and this was an expedient workaround.
Test-bot: skip
Previously, the event handler was attached to body, but in the event of
the keyboard failing to render, the body element will typically be zero
pixels high. Instead, attach the handler to the document itself.
KeymanWeb, when running normally, will handle all touches on the
keyboard elements which take 100% of the real estate. So the document
tap will only be received in the case of an error condition.
Also, add a console error that will be reported to Sentry when user has
error reporting switched on.
Test-bot: skip
This change fixes two problems that cause a script error in Sample1 app:
- add internet access permissions so that the Sentry server can be reached
- explicitly set the default keyboard since sil_euro_latin keyboard is not
included in the sample apps. This works around #16215.
Fixes: #16180
Build-bot: release:android
This change renames the font variable names so that they match the
two conceptual fonts we have. Also remove obsolete code that dealt with
the `font` parameter being a JSON object instead of a string containing
the font filename. Having the `font` parameter containing a JSON object
was legacy code that won't happen with current Keyman versions.
Follow-up-of: #16188
Build-bot: release:android
PR #16146 introduced a problem with selecting a different font as
display font so that we always ended up with not setting the font.
This was caused by the font filenames now being a URL (which is necessary
because they get processed by the web engine). However, the Android code
checks for the existence of the font in order to create the typeface,
which only works for local paths.
This PR modifies and simplifies `KMKeyboard.getFontFilename` to return the
full path, renames `KMKeyboard.txtFont` and `KMKeyboard.oskFont` to make
it clearer that they contain a path and not a URL.
Also initialize `KMKeyboard.oskFontPath` with empty string instead of
`null`. This makes it consistent with` txtFontPath` and with the
documented behavior of `KMManager.getKeyboardOskFontFilename()` (which
returns `KMKeyboard.oskFontPath`).
Follows: #16146Fixes: #16187
Build-bot: release:android
We use SIL EuroLatin as fallback keyboard. If that is not installed,
previously we output an error which showed up as a toast for the user.
This change now outputs a warning instead of the error for the default
keyboard.
Also changed the KeyboardHarness test app to set a different keyoard as
default.
The default fonts (DejaVueSans.ttf and keymanweb-osk.ttf) are located in
the root directory, not the package directory. This fixes the
KeyboardHarness test app.
Also some improvements with variable and function names to better match
what they do.
On Windows the tests failed because the AppData directory doesn't yet
exist under an allowed app internal storage path. This change creates
the directory first when running tests.
Also fix `assertEquals` in that test file - the parameter ordering is
`expected, actual` but we had it the other way round which gives a
confusing message if the test fails.
* Clean up `KMLog` -- simpler code paths, DRY out common validation,
remove redundant re-entrancy checks.
* Use Sentry `setTag` API and scopes instead of `setExtra`.
* Wrap all potential failure points in exception handlers for extra
resilience -- do our best to make sure errors are reported in as many
cases as possible.
Fixes: #16122
Test-bot: skip
This change moves to using `WebViewAssetLoader` for loading files from
the device instead of using file:// URLs. This fixes the blank keyboard
problem reported in #16096 for Android.
Also make `KMKeyboard.getKeyboardRoot()` private, and rename public
`Keyboard.getKeyboardPath()` to private `Keyboard.getKeyboardUrl()`.
Part-of: #16096
For Keyman for Android, add the new `keyman-version` parameter to the
api.keyman.com/package-version call so that updates to packages that are
not supported on the current version of Keyman will not be offered. This
supports the scenario where an updated keyboard or lexical model depends
on a newer version of Keyman. Note that an older version of the keyboard
or lexical model package will not be offered (the user can still
download and install an older version manually, but generally, the
recommended solution is to upgrade Keyman; there would be significant
cost to add support for querying and installation of older version
keyboards on the server side, for limited benefit).
Relates-to: keymanapp/api.keyman.com#325