I cannot let it work in any ways.
I did also try to put some logs on the android class, c++ class and ts files.
The flow goes straight and nicely since this._eventTarget.emit(eventType, inputEvent); in keyboard.ts but i never received the event on my ts files.
I use this code:
But it does not work.
I can engineering to have a look.
You can try overriding the dispatchKeyEvent method in the AppActivity.
Back key it’s working on web preview.
But it does not work on android apk.
Mmm i don’t think this will do what i am asking.
So, as for example, if you press the back key during gameplay an ingame menu will open.
That should be already handled by cocos engine by actually did not work for me since 3.1.x
It did work on 3.0.x (even if there were this error )
Can you provide a simple demo?
Sorry for the late answer…
This is the little project:
AndroidBackKeyTester.zip (1.2 MB)
And this is the compiled (non working) apk:
Sorry, I misunderstood you before, this issue is already being dealt with.
If it’s urgent, you can modify this file.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.