GestureDetector does not exist

I am attempting to use GestureDetector in one of my apps but in Processing 3 it says it doesn’t exist. I notice from one of noel’s answers in 2020 that it does exist. Do you have any further information? Is it (only) in Processing 4? I have tried downloading Processing-4.0a4 but it repeatedly reverts to Processing 3.5.4

Any suggestions?

@noel produced a lot of code for apde which may be why it doesnt work from processing android mode.

Have you tried ketai?

http://ketai.org/examples/gestures/

@paulgoux
Thank you for your reply Paul. I’ll try it when I get back.

@paulgoux
I have tried the ketai software but Processing tells me KetaiGesture does not exist. I have imported it into the pde, but it won’t accept it.

Also, i would like to use the onFling method (of GestureDetector) and Ketai does not list it. Does it use a different name?

Any ideas?

1 Like

I have installed the Ketai library and now KetaiGesture is recognised. I suppose this should have been obvious, but without hints, it needed extra thought. Thank you @paulgoux

1 Like

great glad it works, also looking at the ketai reference we can see that it does indeed contain onFling

http://edge.rit.edu/content/P14215/public/Software/P14215_Nick/Code/Processing%20Library%20Folder/Ketai/reference/ketai/ui/KetaiGesture.html

also here is the java file from their github

so I suppose you should just be able to add

void onFling(float x, float y, float d){
  doSomething();
}