I currently have a bug in my app which I can’t figure out where it comes from. On Android the MouseButtonTrigger events (which work fine on Desktop) are suddenly no more recognized. I created a very simple test app which uses the following code in the simpleInitApp method:
inputManager.addMapping(CLICK_KEY, new MouseButtonTrigger(
MouseInput.BUTTON_LEFT));
inputManager.addListener(new ActionListener() {
@Override
public void onAction(String name, boolean isPressed, float tpf) {
Log.e(LOG_TAG, "onAction");
}
}, CLICK_KEY);
inputManager
.addMapping(TOUCH_KEY, new TouchTrigger(TouchInput.ALL));
inputManager.addListener(new TouchListener() {
@Override
public void onTouch(String name, TouchEvent event, float tpf) {
Log.e(LOG_TAG, "onTouch");
}
}, TOUCH_KEY);
In the simple test app I get both events on Android so onAction and onTouch are both shown in the LogCat but in my normal project only the onTouch events are detected. What could be the cause of that problem? Does someone have an idea?