# GestureDetector does not exist

**URL:** <https://discourse.processing.org/t/gesturedetector-does-not-exist/30776>\
**Category:** Processing for Android\
**Created:** [June 18, 2021, 8:31am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776 "2021-06-18T08:31:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [June 18, 2021, 8:31am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776/1 "2021-06-18T08:31:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 18, 2021, 8:36am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776/2 "2021-06-18T08:36:21Z")

</div>

@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/](http://ketai.org/examples/gestures/)

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [June 18, 2021, 10:09am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776/3 "2021-06-18T10:09:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [June 19, 2021, 8:34am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776/4 "2021-06-19T08:34:28Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [June 20, 2021, 7:13am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776/5 "2021-06-20T07:13:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 20, 2021, 10:50am UTC](https://discourse.processing.org/t/gesturedetector-does-not-exist/30776/6 "2021-06-20T10:50:42Z")

</div>

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](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

> <https://github.com/ketai/ketai/blob/master/src/ketai/ui/KetaiGesture.java>

so I suppose you should just be able to add

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

```
