MouseButtonTrigger not triggered on Android

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(
			inputManager.addListener(new ActionListener() {
				public void onAction(String name, boolean isPressed, float tpf) {
					Log.e(LOG_TAG, "onAction");
			}, CLICK_KEY);

					.addMapping(TOUCH_KEY, new TouchTrigger(TouchInput.ALL));
			inputManager.addListener(new TouchListener() {

				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?

Well…when you say “suddenly” what does that mean? During execution it stops to work or…it worked before now it doesn’t?
If it’s the latter, what changed? maybe you can go back in your commit log and find out the commit that introduced the issue?

There is a flag in the AndroidHarness that dictates if touch input should be emulated as mouse input, maybe you set it to false or something like this.
boolean mouseEventsEnabled = true;

With “suddenly” I mean that it once worked, now I added some new features and it does not work anymore :wink: The problem is that I didn’t realy touch any part related to the input manager. The biggest think I added was some load/save logic to restore the last state of the application when the user restarts it.

Well you best bet is to rewind the commits then.