Android C ++ Gesture Code

Can I use gesture code to work with Android and C ++? If so, how can this be done?

+3
source share
1 answer

The easiest way is to pass information from MotionEvent and / or GestureDetector to your own code through JNI. Exactly how you do this is up to you, but the basic principle is no different from what is connected with any other message between native and Java code.

If you ask if you can purchase MotionEvents without going through the JNI, if possible, it's a lot harder than it costs. You could (and probably should) use a tool like SWIG to avoid the pain of manually writing JNI shell code.

+1
source

Source: https://habr.com/ru/post/1789056/


All Articles