Android ndk multitouch?

im write an application that uses only native code.
So can I get multitouch events in ndk?
I feel like Ive served the whole network, but I didn’t find anything!

Does anyone know how to do this?

+8
android events android-ndk jni multi-touch
source share
1 answer

Yes it is. You can check out an example called native-activity to find out how to get input events. Find the engine_handle_input function. The AInputEvent_getType function returns the type of the event. If this is AINPUT_EVENT_TYPE_MOTION , then using the AKeyEvent_getAction function AKeyEvent_getAction you can get various information about the touch event. Use the enumerations AMOTION_EVENT_ACTION_MASK , AMOTION_EVENT_ACTION_POINTER_INDEX_MASK , AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP in the same way you use them in the Java API: http : //android-developers.blogspotmtml/multi

+11
source share

All Articles