Ionic BackButton

Hi guys, I am having a problem with my splashscreen… It is showing only for the first run so i decided to override the back button and exit the app using this code:

$ionicPlatform.registerBackButtonAction(function (event) {

  if ($state.current.name == "index") {
      var confirmPopup = $ionicPopup.confirm({
                    title: 'Confirm Exit',
                    template: "Are you sure you want to exit?"
                });
            confirmPopup.then(function (close) {
                if (close) {
                    // there is no back view, so close the app instead
                    navigator.app.exitApp();
                } // otherwise do nothing
                console.log("User canceled exit.");
            });
  
  }
  else {
       navigator.app.backHistory();
       }  }, 100);

I successfully exit the app but as I reopen it the problem still showing. The code only exit my app and goes to the background but not killing it. I want to kill my app in order when I reopen the app, The splash screen shows again. Thanks…