【发布时间】:2016-05-18 15:01:27
【问题描述】:
【问题讨论】:
-
你的问题解决了吗?
-
抱歉,什么也没找到……
【问题讨论】:
您可以使用InputMethodManager.setInputMethodEnabled(String id, boolean enabled) 做您想做的事。首先,您需要为您的键盘找到完整的输入法 ID - 您很可能能够在 dumpsys input_method 输出中找到它。
然后你可以使用service call input_method 28 s16 'input.method.name' i32 0做禁用和service call input_method 28 s16 'input.method.name' i32 1重新启用输入法。
以下命令在 Android 5.1 手机上添加了Google Hindi Input:
adb shell su 0 service call input_method 28 s16 'com.google.android.apps.inputmethod.hindi/.HindiInputMethodService' i32 1`
并且该命令已将其从启用的输入法列表中删除:
adb shell su 0 service call input_method 28 s16 'com.google.android.apps.inputmethod.hindi/.HindiInputMethodService' i32 0`
【讨论】: