开发者

Android - How to Generate Key Presses Programmatically

开发者 https://www.devze.com 2023-03-22 13:31 出处:网络
After reading through this \" How to Generate Key Presses Programmatically Android \" and the associated answers, I created a class that extends InputMethodService, but is empty otherwise.

After reading through this " How to Generate Key Presses Programmatically Android " and the associated answers, I created a class that extends InputMethodService, but is empty otherwise.

I create an instance of that class and then do something like this _imsExtend.getCurrentInputConnectio开发者_StackOverflow中文版n(), but it appears that getCurrentInputConnection() returns a null pointer and causes issues thereafter.

What am I forgetting to do? I am guessing I need to setup some of the parameters of _imsExtend, but what?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号