Android 如何禁用软键盘候选项

Android 如何禁用软键盘候选项,android,soft-keyboard,Android,Soft Keyboard,我的应用程序使用GLSurfaceView,通过扩展的BaseInputConnection从软键盘接收数据。但在某些设备上会出现带有候选词的框,应用程序可能会获取错误的数据。类InputMethodService具有方法 setCandidatesViewShown(boolean shown) 但我无法获得当前InputMethodService的参考,文档中说只有系统可以直接与InputMethodService交互。扩展InputMethodService-对于此任务来说太复杂。有没有

我的应用程序使用GLSurfaceView,通过扩展的BaseInputConnection从软键盘接收数据。但在某些设备上会出现带有候选词的框,应用程序可能会获取错误的数据。类InputMethodService具有方法

setCandidatesViewShown(boolean shown)
但我无法获得当前InputMethodService的参考,文档中说只有系统可以直接与InputMethodService交互。扩展InputMethodService-对于此任务来说太复杂。有没有办法禁用应用程序中的候选人