bug(android): sil_euro_latin is implicitly required by Keyman Engine for Android
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
> 3\. KMSample1 does not package sil_euro_latin and does not reference it, so it should not be loaded by KMW.
>
> This is due to a flaw in the Keyman Engine for Android API: the default keyboard is used even when it is not available. It can be bypassed by calling `setDefaultKeyboard()` but this should not be necessary. Suggested mitigation: add the call for now in kmsample1, and open an issue to address this more robustly in v20.
>
> It seems that this happens only on first run. Why doesn't it happen on subsequent launches?
>
> This is due to `KMKeyboardJSHandler.initialKeyboard()` which looks for a user preference and sets it if missing, and only ends up using the default keyboard if the preference is missing:
>
> https://github.com/keymanapp/keyman/blob/72bd63b4d10b701c3dcab9dec032735357873f70/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java#L74-L82
>
>
_Originally posted by @mcdurdin in [#16180](https://github.com/keymanapp/keyman/issues/16180#issuecomment-4933769700)_
Contributor guide
Research direction
Start with KMKeyboardJSHandler.initialKeyboard() in android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java, especially lines 74–82, and review how KMSample1 configures its keyboards. Reproduce the first-run and subsequent-launch behavior, then verify that an unavailable default keyboard is not loaded and that KMSample1 no longer needs the suggested workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100