From b3dcd61c2872085a790b5b063a3ec6d73f75e888 Mon Sep 17 00:00:00 2001 From: abb128 Date: Fri, 19 Jan 2024 00:42:29 +0200 Subject: [PATCH] Add element for detecting IMEs (#526) 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 --- AndroidManifest.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 19c5185..2cb8b17 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -21,4 +21,11 @@ + + + + + + +