我认为我的问题标题足以说明我现在面临的问题。我创建了一个实现 InputMethodService 的类,我启动了这个服务,然后我从我的 Activity 中调用了 InputConnection 值,但总是得到 null 值。任何人都可以帮助我吗?
最佳答案
你可以在这一行找到答案
http://mylifewithandroid.blogspot.com/2009/01/generating-keypresses-programmatically.html
关于Android 如何从 InputMethodService 中获取未扩展的 'getCurrentInputConnection()',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9512034/