How to get backbutton to act like homebutton cordova in android

When pressing backbutton in android I want the app the be close and paused, not terminated, as when you press the homebutton. Is it any way to do this in cordova (ionic)? Like what method/event is "homebutton" firing?

Thanks

$ionicPlatform.registerBackButtonAction(function () {
  if ($state.current.name == "signIn"){
    navigator.app.exitApp();
  } else {
    navigator.app.backHistory();
  }
}, 100);

for reference please check the blogspot under register back button action and reply me if you have any queries