AppMinimize is a cordova plugin to minimize the application in android devices
- Android
Cordova:
cordova plugin add cordova-plugin-appminimize
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
ionic cordova plugin add cordova-plugin-appminimize
npm install --save @ionic-native/app-minimize
import { AppMinimize } from '@ionic-native/app-minimize';
...
constructor(private appMinimize: AppMinimize) { }
...
this.platform.registerBackButtonAction(() => {
this.appMinimize.minimize();
});