To detect voice IMEs, Unexpected Keyboard calls InputMethodManager.getEnabledInputMethodList
Internally, this method eventually calls a method that returns a filtered list of packages that may not include the installed voice IME, and thus Unexpected Keyboard unexpectedly claims no voice input is installed because it can't see it.
The fix is to explicitly state in the manifest that we want to query for other IMEs, based on https://developer.android.com/training/package-visibility/declaring
This is not an issue with Google's voice input or other preinstalled voice inputs because they usually have android:forceQueryable=true, but this is an issue with third-party voice inputs such as FUTO Voice Input. Launching the voice input app after activating the keyboard also usually makes the package visible, so a consistent way to replicate this issue on modern Android is to reboot the device and try triggering voice input from the keyboard
This activity points to the system settings page for enabling input
methods. This is purely a shortcut but is expected by many users.
It could be made more useful in the future or hidden whenever the
keyboard is enabled.
There seems to be no "DayNight" theme compatible with older version of
android outside of the androidx library.
Using 'Theme.DeviceDefault' which is a dark theme, even if it doesn't
sounds like. Detect if a light theme should be used at activity
creation.
API level 12 is required for "subtype" code introduced in 1.7.
This adds a fallback for older version, "subtype" features are not
available but the keyboard is usable.
Changet he minimal version to 4 to be able to query the API level.
Using integer constant for versions because that's how it's presented in
the documentation. Build.VERSION_CODES is WTF.