Change the view when app is on background

Is it possible to change the view when app is on background. I tried with the following code but the state doesn’t change before app is getting in background?

            $ionicPlatform.on('pause', function () {
                $state.go('pause');
            });