hi every one
I have problem in handling back button on Android device
when I press back button , game will be close and code don’t run
my code for handling back button :
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN ,(event) => {
console.log(event.keyCode);
console.log(cc.macro.KEY.back );
if (event.keyCode == cc.macro.KEY.back ) {
this.label.string = "back button pressed"
}
} , this)
I use version 2.4