I'm developing an android app that needs to send touch events to /dev/input/eventX. I know the C
code structure to do such a thing is the following:
struct input_event {
struct timeval time;
unsigned short type;
unsigned short code;
unsigned int value;
};
To use such a code, I need to set NDK. Instead, I want to run equivalent linux
commands using Runtime.getRunTime.exec ()
in android without the need to use NDK. Is there any way to do that?
If no, what are the rest of C
code needed to send an event? For example, how can I send a touch event at x=200 and y=300 to event0? I searched and I didn't find a clear solution.
Thanks.