Android touch input

What is the current best practice for Android touch input? I am well aware of touch input in general and have emulated it on android too (using the mouse events) but I cannot find any reference as to what is the contemporary method to capture multiple touches and gestures? Is there a tutorial on that?

Here I cannot find a thing: http://wiki.jmonkeyengine.org/doku.php/jme3#tutorials_for_beginners

The only thing I found is this:
http://wiki.jmonkeyengine.org/doku.php/jme3:android

It suggests the use of com.jme3.input.controls.TouchListener to receive touch events.
Looks like there are no examples in jME3 demonstrating touch input at all…

1 Like

Alright, I can create and add a listener, but what mapping String should I use for it? The mappings tie together Triggres and Listeners, but here - do I have to create a Trigger for a TouchListener… I am looking at the InputManager code and it seems like I should do some mapping, but how?

You have to create a mapping with TouchTrigger first.
The TouchTrigger allows to register to all events if 0 is specified in its constructor.

1 Like

That was really enlightning! At least, now I see a straight path before me. Alright, but what is this then?

That’s the implementation of touch input for Android.
iOS has its own implementation, for example.