Back key not detected on Android Gesture Navigation

I have the “Back” input binding, and it works perfectly find for button navigation. Touching the back (in case of back in screen) and touching the back button out of the screen (old phone) works all well.

But when I enable the gesture navigation it does not work as expected.

The system is detecting the back, as I get the vibration feedback, but the game does not.

The game does detect sometime, like if I swap multiple times, it detect sometimes and no regular pattern.

I tried not sending the event to button (from defold input) and moving the back_button test to top, it did not help.

function on_input(self, action_id, action)
	if action_id == hash("back_button") and action.released then
		back_pressed(self)
	end
	
	-- button.on_input(action_id, action)
	-- self.druid:on_input(action_id, action)

Yes input binding is set for Back to back_button. Removing the action.released does not work as well.

I wonder if we broke something during glfw migration? It is supposed to work correctly with gestures:

Ping @AGulev and @jhonny.goransson

@InfoDevkota do you happen to have a custom AndroidManifest.xml file without android:enableOnBackInvokedCallback="true" ?

Yes, I am using custom AndroidManifest.xml, but android:enableOnBackInvokedCallback="true" is there.

    <application
        {{#has-icons?}}
        android:icon="@drawable/icon"
        {{/has-icons?}}
        android:extractNativeLibs="{{android.extract_native_libs}}"
        android:label="{{project.title}}" android:hasCode="true"
        android:name="android.support.multidex.MultiDexApplication"
        android:enableOnBackInvokedCallback="true"
        android:debuggable="{{android.debuggable}}">

The phone I have tested is Android 9 and 10.

I have seen you answer lots of questions and were really helpful. Happy to interact with you.

1 Like

I run the BackButtonTest.zip included on that PR, and Its not working as expected on my phone as well.

It recognize sometimes and the pressed and released happened at once (as seen in the UI of that zip).

Hmm, ok, we need to do some tests here on our end then. I can’t say exactly when we have time to look into it. I’ll try to at least verify the issue tomorrow.

1 Like

Hello, did you manage to confirm the issue?

Sorry, yes I was able to reproduce it!

1 Like