Commit graph

2640 commits

Author SHA1 Message Date
Eberhard Beilharz
dc47e32b87 fix(android): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-09-22 06:08:50 +02:00
Eberhard Beilharz
8fdbf04ce8 fix(android): rename method to getKeyboardTextFontFilenameOnly
This addresses a code review comment.
2026-09-22 06:08:49 +02:00
Eberhard Beilharz
30063da5ce Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-09-22 06:08:48 +02:00
Eberhard Beilharz
a89dd1bed0 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-09-22 06:08:48 +02:00
Marc Durdin
65b02ae75f fix(android): skip test on Windows that triggers androidx WebKit bug
Fixes: #16183
Test-bot: skip
2026-09-22 06:08:19 +02:00
Eberhard Beilharz
bdef84ebb4 fix(android): suppress error for fallback keyboard
Cherry-pick-of: #16146

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-09-21 10:14:52 -05:00
Eberhard Beilharz
9a04726d3a fix(android): fix typo 2026-09-21 10:10:06 -05:00
Eberhard Beilharz
ed21a0f780 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-09-21 10:10:06 -05:00
Eberhard Beilharz
052b40a90f fix(android): add missing dependency for KeyboardHarness app 2026-09-21 10:10:06 -05:00
Eberhard Beilharz
3e087ac186 fix(android): add missing dependency for FirstVoices and Samples
Fixes: FV-ANDROID-20E
Build-bot: release:android
2026-09-21 10:10:06 -05:00
Eberhard Beilharz
8f3ce341f8 fix(android): fix failing test on Windows
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-09-21 10:10:05 -05:00
Eberhard Beilharz
aee5620dbf 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-09-21 10:09:59 -05:00
Eberhard Beilharz
48b03579f3 chore(android): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-09-21 10:04:41 -05:00
Eberhard Beilharz
1f3fabda78 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-09-21 10:04:38 -05:00
Eberhard Beilharz
3202632780 maint(android): update Android Target API to 36 🍒
This change updates the Android Target API to 36 to satisfy the upcoming
annual Play Store Aug 31 requirement. It updates Keyman for Android to
use API level 36 by changing the compileSdk and targetSdkVersion
properties to 36.

Also update `compileSdkVersion` and some reformatting in `README.md`.

Changes made by AI (Gemini 3 Flash Preview).

Fixes: #16279
Build-bot: release:android
Cherry-pick-of: #16280
2026-09-21 10:35:27 +02:00
Eberhard Beilharz
5883c9092f
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.

Cherry-pick-of: #16237
Test-bot: skip
2026-07-14 18:13:52 +02:00
Darcy Wong
eeffb2cdf8 fix(android): Set the main app background white 2025-10-20 15:26:55 +07:00
Darcy Wong
6cb9749256 fix(android): Refactor bottom inset calculations for inapp and system 2025-10-09 06:42:57 +07:00
Darcy Wong
c0a0d879b4 fix(android): Convert longpress delay menu to ConstraintLayout 2025-10-08 15:26:06 +07:00
Darcy Wong
7337952f6f docs(android): Document getNavigationBarHeight API 2025-09-25 20:58:05 +07:00
Darcy Wong
cb9e295d46 cherrypick(android): Fix bottom insets for KMSample2 and FirstVoices 2025-09-25 20:57:32 +07:00
Darcy Wong
94535521fd cherrypick(android): Apply bottom insets to system keyboard 2025-09-25 20:56:52 +07:00
Darcy Wong
ee90c4308b fix(android): Update KMSample1 when changing orientation 2025-09-03 09:57:55 +07:00
Darcy Wong
51645c1e91 fix(android): Cl;eanup list layout in Engine and FirstVoices for edge to 2025-09-02 07:36:00 +07:00
Darcy Wong
482b6df3de fix(android): Update Sample, Test, and FirstVoices apps for edge to edge
fix(android): Update Sample, Test, and FirstVoices apps for edge to edge 🪟
2025-09-02 07:35:43 +07:00
Darcy Wong
3735b10a76 fix(android): Fix insets for in-app vs system keyboard 2025-08-29 08:05:00 +07:00
Darcy Wong
cbcb2cc2a2 fix(android): Update other activities for edge to edge 2025-08-25 09:44:36 +07:00
Darcy Wong
6d07af25b2 fix(android): Convert Keyman app layout to use ConstraintLayout 2025-08-25 09:44:35 +07:00
Darcy Wong
16ea45f9f7 fix(android): Update to Java 21 and Gradle dependencies 2025-08-25 09:00:06 +07:00
Darcy Wong
e2b5063f30 fix(android): Update Android Target API to 35 2025-08-22 11:26:44 +07:00
Darcy Wong
0457b55074
Merge pull request #14561 from keymanapp/cherrypick/android/show-osk-preference
fix(android): Add preference to show on-screen keyboard to Keyman and FirstVoices apps 🍒 🏠
2025-08-21 07:47:09 +07:00
Darcy Wong
44c68c53dd
Merge pull request #14547 from keymanapp/cherrypick/android/14538-show-osk
fix(android): Show system OSK when physical keyboard connected 🍒 🏠
2025-08-21 07:46:48 +07:00
Darcy Wong
5aa99752c9
Merge pull request #14560 from keymanapp/fix/android/sentry-7
fix(android): Update sentry-android dependency to 7.22.6 for 16 KB page alignment 🍒 🏠
2025-08-21 07:45:42 +07:00
Darcy Wong
60411736e6 fix(android): Add "Show On-screen keyboard" preference
fix(android): Add "Show On-screen keyboard" preference to display OSK when physical keyboard is connected 👁️
2025-08-20 09:41:13 +07:00
Darcy Wong
764aec33d0 fix(android): Update sentry-android to 7.22.6 2025-08-20 09:14:20 +07:00
Joshua Horton
08a69b95d5 change(android): check globalThis before polyfill 2025-08-19 08:35:16 -05:00
Joshua Horton
0e8f34a2b3 docs(android): add min Chrome version in polyfill doc 2025-08-19 08:35:16 -05:00
Joshua Horton
2cee36e86b fix(android): polyfill globalThis for API 28 devices
Fixes: #14450
Cherry-pick-of: #14541
2025-08-19 08:35:07 -05:00
Darcy Wong
31f5e43958 fix(android): Show system OSK when physical keyboard connected 2025-08-19 09:26:23 +07:00
Darcy Wong
7c3f91c415 fix(android): Get default sizes before initializing keyboard 2025-08-07 10:55:12 +07:00
Joshua Horton
261283d356 change(android): address PR review concerns 2025-05-21 08:08:24 +07:00
Joshua Horton
c193c3fe17 feat(android): log installed keyboard count 2025-05-21 08:08:24 +07:00
Joshua Horton
5116c3e749 feat(android): log active keyboard, model IDs with reported errors
Cherry-pick-of: #13983

To facilitate code investigation and issue repro attempts, we should log the
engine's current keyboard, language code, and model when reporting errors.

Fixes: KEYMAN-ANDROID-71V

(As this adds Sentry logging, I needed a reliable error with inspectable logs
for development.)

Test-bot: skip
2025-05-21 08:08:24 +07:00
Darcy Wong
6662b61291 fix(android): Use Alert Dialog if keyboard pkg missing languages
Cherry-pick-of: #13786
2025-04-30 09:36:30 +07:00
Darcy Wong
1994b273a1 fix(android): Apply review suggestions 2025-04-22 10:29:22 +07:00
Darcy Wong
2fb71a1898 fix(android): Check if RELEASE_OEM_FIRSTVOICES not set 2025-04-22 10:21:32 +07:00
Darcy Wong
157b7bb54b fix(android): Require RELEASE_OEM env vars to build FirstVoices Android 2025-04-22 10:02:55 +07:00
Darcy Wong
0affbd6d4b docs(android): Update documentation 2025-04-11 11:07:17 +07:00
Darcy Wong
23fb318549 fix(android): Fix system keyboard banner on reload
Follows the in-app keyboard pattern of refreshing banner theme when the keyboard is shown

Fixes: #13693
2025-04-11 10:57:36 +07:00
Darcy Wong
c5c111bbe7
Merge pull request #13691 from keymanapp/chore/crowdin-es419
chore(android,mac,windows): Update crowdin strings for Spanish Latin America
2025-04-10 16:53:49 +07:00