Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerMethod not supported #246

Open
nakednous opened this issue Sep 8, 2016 · 2 comments
Open

registerMethod not supported #246

nakednous opened this issue Sep 8, 2016 · 2 comments

Comments

@nakednous
Copy link

nakednous commented Sep 8, 2016

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.

@codeanticode
Copy link
Member

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?

@nakednous
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants