im writing an application that uses only native code.
So is it possible to get multitouch events in ndk?
I feel like ive serched the whole web, but without finding anything!
Does anyone know how to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it is.
You can check example called
native-activityto see how to get input events. Look forengine_handle_inputfunction.AInputEvent_getTypefunction returns type of event. If it isAINPUT_EVENT_TYPE_MOTIONthen usingAKeyEvent_getActionfunction you can get different information about touch event. Use theAMOTION_EVENT_ACTION_MASK,AMOTION_EVENT_ACTION_POINTER_INDEX_MASK,AMOTION_EVENT_ACTION_POINTER_DOWNandAMOTION_EVENT_ACTION_POINTER_UPenums in same way you use them in Java API: http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html