addClient(in IInputMethodClient client, in IRemoteInputConnection inputmethod, int untrustedDisplayId)
client/输入连接/displayId
添加一个输入法客户端
二、输入法信息查询
方法名
参数
描述
getCurrentInputMethodInfoAsUser(int userId)
userId
获取当前用户使用的输入法信息
getInputMethodList(int userId, int directBootAwareness)
userId/boot模式
获取所有输入法列表
getEnabledInputMethodList(int userId)
userId
获取已启用的输入法列表
getEnabledInputMethodSubtypeList(String imiId, boolean allowsImplicitlyEnabledSubtypes, int userId)
imeId/是否允许隐式启用/userId
获取输入法子类型列表
getLastInputMethodSubtype(int userId)
userId
获取最后一次使用的子类型
getCurrentInputMethodSubtype(int userId)
userId
获取当前输入法子类型
三、软键盘显示控制
方法名
参数
描述
showSoftInput(IInputMethodClient client, IBinder windowToken, ImeTracker.Token statsToken, int flags, int lastClickToolType, ResultReceiver resultReceiver, int reason)
client/windowToken/统计令牌/标志位/点击工具类型/回调/原因
显示软键盘
hideSoftInput(IInputMethodClient client, IBinder windowToken, ImeTracker.Token statsToken, int flags, ResultReceiver resultReceiver, int reason)