Crosswalk and Android back button


#1

I have a samsung galaxy s4 and I created a simple app with a list of 3 cards with some dummy information, just enough so I could scroll the list. The application also has a side menu. The scrolling and the side menu animation didn’t seem smooth so I switched to Crosswalk and the difference is amazing.

My question is that now that crosswalk is in, the device back button doesn’t exit the application, it doesn’t seem to do anything. If I remove crosswalk the button works again and exits the app. Once I put it back in doesn’t exit the app and I have to kill it in the task list.

Does anybody have any ideas how to fix this issue using crosswalk ?

Thank you.


#2

I have exactly same issue. Need a solution.


#3

Same problem here,
i’ve tried also with register a callback on hardwarebackbutton like these

$ionicPlatform.registerBackButtonAction(function() {
    navigator.app.exitApp();
},  110);

but nothing happens.

Also i get this error via logcat

exec() call to unknown plugin: app

I believe this is an issue of crosswalk? Anyone know how we can correct this?


#4

Here you can find a workaround Crosswalk - exitApp()


#5

Awesome!!! Thanks. I will give that a try


#6

This code does it all for me:

// Android back
$ionicPlatform.registerBackButtonAction(function() {
	if($ionicHistory.backView() == null) {
		window.close();
		ionic.Platform.exitApp();
	}
	else {
		$ionicHistory.goBack();
	}
},  110);