![]() |
How to send Keyevent to android - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184) +---- Thread: How to send Keyevent to android (/showthread.php?tid=290288) |
How to send Keyevent to android - jennifer_jiang - 2016-09-09 I want to send a keyevent to android. I want to call InputManager.injectInputevent(InputEvent event, int mode), /xbmc/platform/android/jni There is no InputEvent.h in this folder.so I want to add it. But there are 4 files should to add ,.h ,.cpp. .o. .p,What are ".o" and ".p"? How can I create them? Please help me , thank you! RE: How to send Keyevent to android - Koying - 2016-09-09 Those are generated files. You only need to create the .h and .cpp And, before you ask, we won't teach you how jni works ![]() RE: How to send Keyevent to android - jennifer_jiang - 2016-09-19 (2016-09-09, 08:24)Koying Wrote: Those are generated files. Now I generate the InputEvent.h and InputEvent.cpp. When I use the function injectInputEvent(InputEvent ev, int mode);,I generate the KeyEvent ev, then put it to injectEvent,but in xbmc/platform/android/jni/KeyEvent.h, the KeyEvent dosen't inherit form InputEvent ,class CJNIKeyEvent : public CJNIBase, Please tell me how to use the function of injectInputEvent. Thank you very much. |