AppMinimize is a cordova plugin to minimize the application in android devices
- Android
Cordova:
cordova plugin add https://github.com/tomloprod/cordova-plugin-appminimize.git
This plugin exports an object with one method called "minimize":
window.plugins.appMinimize.minimize();
In this example the application is minimized by pressing the back button
$ionicPlatform.registerBackButtonAction(function (event) {
event.preventDefault();
window.plugins.appMinimize.minimize();
}, 100);
In this example the application is minimized by pressing the back button
this.platform.registerBackButtonAction(() => {
window['plugins'].appMinimize.minimize();
});