Touch events (or not) on Android

Hi everyone.

I’m developing my first app on Android. I used Nifty, and it works amazingly well.
I now want to make a small custom GUI system, but don’t know how to proceed.
The question is: how do I know where the user pressed?

Bonus question : How do I use the inputManager for android? TouchTrigger or MouseTrigger?

No one wanna shoot the trouble?

2h is really a too small timespan to expect an answer in.

Anyway take a look at rawinputlistener

Thanks! That really helped me out.

You can code your application as a computer one and then use inputManager.setSimulateMouse(true) and inputManager.setSimulateKeyboard(true). You don’t need to change your code,a mouse click is translated to a touch.

For this you could borrow parts of Lemur. It’s designed as separate modules to help write custom GUIs. It just happens to also have it’s own GUI library, too.

But picking and mouse handling is something it does natively and already works for any JME spatial.

Yeah, I looked at Lemur too, but all I need is to get the position and the distance between that and some point, so it’s really not that much what I need. It will be enlightening to do this myself.
(Although I did need some help already.)