Commit graph

2878 commits

Author SHA1 Message Date
Eberhard Beilharz
7889d9a713
Merge pull request #16216 from keymanapp/fix/android/16180_scriptError
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
2026-07-13 10:13:19 +02:00
Marc Durdin
c61734c236
Merge pull request #16139 from keymanapp/feat/android/325-add-keyman-version-check-to-package-version
feat(android): add keyman-version to package-version check
2026-07-11 22:44:40 +10:00
Marc Durdin
bafc1f8d1a
Merge pull request #16219 from keymanapp/maint/android/use-env-instead-of-file-for-tier
maint(android): use KEYMAN_TIER instead of TIER.md
2026-07-11 17:11:12 +10:00
Marc Durdin
ab2d0a8e7a maint(android): use KEYMAN_TIER instead of TIER.md
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
2026-07-10 15:50:46 +02:00
Marc Durdin
2b2339d2aa fix(android): restrict fallback tap to document element only
Relates-to: #16170
2026-07-10 15:44:03 +02:00
Marc Durdin
2b078ce165 fix(android): handle blank keyboard tap properly
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
2026-07-10 14:08:27 +02:00
Eberhard Beilharz
b22798de44
fix(android): add permissions for Sentry and set default keyboard
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
2026-07-10 11:44:46 +02:00
Marc Durdin
41344abae0
Merge branch 'master' into feat/android/325-add-keyman-version-check-to-package-version
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-07-09 17:44:49 +10:00
Eberhard Beilharz
fcf8988910
Merge pull request #16188 from keymanapp/fix/android/16187_font
fix(android): differentiate between fontPath and fontUrl in Keyman Engine for Android
2026-07-08 14:35:10 +02:00
Marc Durdin
1aae71e998
Merge pull request #16152 from keymanapp/fix/android/16122-refactor-KMLog
fix(android): refactor `KMLog` - simplification and added resilience
2026-07-08 22:34:21 +10:00
Eberhard Beilharz
71aefb8f47
fix(android): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-07-08 11:43:15 +02:00
Eberhard Beilharz
70282bfd5b
fix(android): rename method to getKeyboardTextFontFilenameOnly
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
This addresses a code review comment.
2026-07-03 17:26:05 +02:00
Eberhard Beilharz
1867a7659f
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-07-03 17:23:19 +02:00
Eberhard Beilharz
1191e4387f
fix(android): fix setting font
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: #16146
Fixes: #16187
Build-bot: release:android
2026-07-02 19:52:35 +02:00
Marc Durdin
fb761fc78f fix(android): skip test on Windows that triggers androidx WebKit bug
Fixes: #16183
Test-bot: skip
2026-07-02 09:16:17 +02:00
Eberhard Beilharz
28652af8ab
fix(android): suppress error for fallback keyboard
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.
2026-07-01 12:27:38 +02:00
Eberhard Beilharz
0aa41c1028
fix(android): fix typo 2026-07-01 11:52:02 +02:00
Eberhard Beilharz
a146345eae
fix(android): fix problem with fonts
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.
2026-07-01 11:33:01 +02:00
Marc Durdin
809a3cad4a chore(android): address review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Also add logging if unit test fails
2026-06-30 15:12:59 +02:00
Eberhard Beilharz
b490d20098
fix(android): add missing dependency for KeyboardHarness app
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-06-30 12:56:50 +02:00
Eberhard Beilharz
c606733a56
fix(android): add missing dependency for FirstVoices and Samples
Fixes: FV-ANDROID-20E
Build-bot: release:android
2026-06-30 12:17:13 +02:00
Eberhard Beilharz
71b0586c66
fix(android): fix failing test on Windows
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
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.
2026-06-29 18:25:26 +02:00
Eberhard Beilharz
bec75197b1
fix(android): add tests for WebViewUtils.buildAssertUrl
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.
2026-06-29 17:56:06 +02:00
Eberhard Beilharz
0847fb6ca2
chore(android): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-06-29 16:57:33 +02:00
Marc Durdin
7155e9d722 fix(android): refactor KMLog - simplification and added resilience
* 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
2026-06-29 09:50:51 +02:00
Eberhard Beilharz
64abd5b690
fix(android): fix loading of keyboards on Android
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
2026-06-26 20:01:30 +02:00
Marc Durdin
77ad99ee25 feat(android): add keyman-version to package-version check
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
2026-06-25 11:02:46 +02:00
Marc Durdin
6a98a39b8a
Merge branch 'master' into chore/web-core-preflight 2026-05-27 22:37:12 +10:00
Darcy Wong
d66ecec73d fix(android): Address review comments
* Move Espanol back
* Capitalize Svwnska (Swedish)
2026-04-22 13:53:00 +07:00
Darcy Wong
ded6e1c6f3 fix(android): Reorder display language list 2026-04-22 10:42:37 +07:00
Marc Durdin
70c54b0b40 chore: Merge branch 'epic/web-core' into auto/A19S24-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 04:49:38 +01:00
Darcy Wong
13ba5c8f8e chore(android): Remove unused status vars 2026-03-09 08:20:17 +07:00
Darcy Wong
1db954a7fa chore(android): Cleanup unused extracted text 2026-03-04 14:09:57 +07:00
Marc Durdin
ed63b70bb4
Merge branch 'epic/web-core' into auto/A19S22-merge-master-into-web-core 2026-02-13 11:08:05 +07:00
Darcy Wong
57cf8fd7fa chore(android): Remove unused var 2026-02-03 13:07:16 +07:00
Darcy Wong
72913ca402 chore(android): Cleanup logging statement 2026-02-02 09:34:17 +07:00
Darcy Wong
4654dfad9c refactor(android): Regenerate keyboard search URL when resuming 2026-02-02 09:32:21 +07:00
Darcy Wong
70b140ed35
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-02-02 09:13:44 +07:00
Keyman Server
e77d46f873
Merge branch 'epic/web-core' into auto/A19S21-merge-master-into-web-core 2026-01-31 06:31:15 +01:00
Darcy Wong
bea9de2b33 fix(android): Cleanup to address review comments 2026-01-30 08:48:19 +07:00
Darcy Wong
03e69d03af chore(android): Merge remote-tracking branch 'origin/master' into feat/android/lang
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2026-01-30 07:10:58 +07:00
Darcy Wong
356ef54c86 chore(common): Update Crowdin strings for de 2026-01-29 16:38:12 +07:00
Darcy Wong
866c856b94 feat(android): Use current display language for keyboard search 2026-01-29 09:09:41 +07:00
Marc Durdin
f6b8bfb463
Merge branch 'epic/web-core' into auto/A19S20-merge-master-into-web-core 2026-01-16 08:40:12 +01:00
Darcy Wong
665e82a104 chore(common): Update Crowdin strings for Italian 2026-01-13 09:37:15 +07:00
Darcy Wong
9f86141803 chore(android): Update crowdin strings 2026-01-08 11:37:26 +07:00
Eberhard Beilharz
5b38557227
refactor(web): remove defaults in keyboard-storage
- Also renamed `prefixed` and `withoutPrefix` functions to use the name
  that was aliased on most cases: `toPrefixedKeyboardId` and
  `toUnprefixedKeyboardId`.
- Renamed `ModelManager` class to `ModelCache` which was the name used
  everywhere except in comments.

Part-of: #15292
Test-bot: skip
2025-12-19 18:43:02 +01:00
Darcy Wong
3bdb0694c3 chore(android): Download PT again 2025-12-19 06:19:59 +07:00
Darcy Wong
cbca7630e1 chore(common): Update crowdin strings for PT 2025-12-18 16:13:25 +07:00
Matthew Lee
2f9a321a24 Compressing 2 text boxes into one to save vertical space in the dialog. 2025-12-08 14:34:32 -05:00