How put app in background (Minimize)?

How i can put the app in background mode when the back button (hardware) is tapped in Login view?

The login view is the first view, when back button is pressed this return for login view again.


I have the same problem, please help :frowning:


Hi, I have the same problem, too.

I tried the plugin cordova-plugin-background-mode, but it doesn’t work.
When I press the home button, the plugin works precisely, the onactive function called.
When I press the back button, the plugin works wrongly, the onactive function called and the ondeactive function called immediately.

Expecting for help. Think you.

I just created a plugin called “AppMinimize” for cordova (only for Android devices) that does what you want. I hope it helps you.


cordova plugin add



Example: Minimize app by pressing back button:

$ionicPlatform.registerBackButtonAction(function (event) {
}, 100);



Hi! I installed your plugin but it doesn’t work:
It’s my code in app.js and i tested it on android device:

.run(function($ionicPlatform, $ionicPopup, $state) {
  $ionicPlatform.registerBackButtonAction(function (event) {
      alert('it is dashboard');//it works
    else {;
  }, 100);

Do you have any solution?


What is your device? Can you check your plugin list to make sure that its installed?

 cordova plugin ls

You can try with:

 cordova plugin save

If still with problems, please open an “issue” in github


Your plugin in the list of cordova’s plugins.
And i ran
cordova plugin save
And compiled and installed my app again.
But it doesn’t work again

My device has android 5.1

Besides your installation does’t work, i installed plugin manually.
Maybe it is a problem and i heed help with installation

I used in production in many devices and works well… and I don’t understand why the installation doesn’t work for you.

I’ts pretty simple:

 cordova plugin add

And use the plugin… What is the error you get?

Your plugin is working and thank you!

I have problem with git and environment

1 Like

it’s work on ionic 2 ?