mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-21 23:03:11 +01:00
b3dcd61c28
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
32 lines
1.8 KiB
XML
32 lines
1.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated="false">
|
|
<application android:label="@string/app_name" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:hardwareAccelerated="false">
|
|
<service android:name="juloo.keyboard2.Keyboard2" android:label="@string/app_name" android:permission="android.permission.BIND_INPUT_METHOD" android:exported="true" android:directBootAware="true">
|
|
<intent-filter>
|
|
<action android:name="android.view.InputMethod"/>
|
|
</intent-filter>
|
|
<meta-data android:name="android.view.im" android:resource="@xml/method"/>
|
|
</service>
|
|
<activity android:name="juloo.keyboard2.SettingsActivity" android:icon="@mipmap/ic_launcher" android:label="@string/settings_activity_label" android:theme="@style/android:Theme.DeviceDefault" android:exported="true" android:directBootAware="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN"/>
|
|
</intent-filter>
|
|
</activity>
|
|
<activity android:name="juloo.keyboard2.LauncherActivity" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/android:Theme.DeviceDefault" android:exported="true" android:directBootAware="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN"/>
|
|
<category android:name="android.intent.category.LAUNCHER"/>
|
|
</intent-filter>
|
|
</activity>
|
|
</application>
|
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
|
|
|
<!-- To query enabled input methods for voice IME detection -->
|
|
<queries>
|
|
<intent>
|
|
<action android:name="android.view.InputMethod" />
|
|
</intent>
|
|
</queries>
|
|
</manifest>
|