processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

registerMethod not supported

Open nakednous opened this issue 9 years ago • 2 comments

I noticed that registerMethod for the Android MotionEvent and KeyEvents are not supported (I tested it in Android mode 3.0.1). If I remember well the later was supported in the past. I was wondering whether or not they will be supported in future releases. I wish they will, otherwise I don't see how to parse the event within a third party library, but by declaring a public boolean surfaceTouchEvent(MotionEvent event) within the sketch body itself, e.g., here.

nakednous avatar Sep 08 '16 23:09 nakednous

PApplet has registerMethod() and the registered methods are executed in the draw loop, as far as I can see. What do you mean that they are not supported?

codeanticode avatar Dec 31 '16 01:12 codeanticode

Thanks for pointing them out. I was able to register the Processing TouchEvent, but I can't get the android.view.MotionEvent. Tried:

public void touchEvent(TouchEvent event) {
   android.view.MotionEvent nativeEvent = (android.view.MotionEvent) event.getNative();
  //...
}

without success. Am I missing something?

nakednous avatar Jan 02 '17 22:01 nakednous