How to send Keyevent to android
#1
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!
Reply
#2
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 Wink
Reply
#3
(2016-09-09, 08:24)Koying Wrote: 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 Wink

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.
Reply

Logout Mark Read Team Forum Stats Members Help
How to send Keyevent to android0