Skip to content

This is a cordova plugin to minimize (or send to backrgound) the application on android devices

License

Notifications You must be signed in to change notification settings

dlatikaynen/cordova-plugin-appminimize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-appminimize License

AppMinimize is a cordova plugin to minimize (or send to background) the application on android devices

Supported Platforms

  • Android

Installation

Cordova:

cordova plugin add cordova-plugin-appminimize

Usage

This plugin exports an object with one method called "minimize" and another one called "sendToBackground":

window.plugins.appMinimize.minimize();
  
window.plugins.appMinimize.sendToBackground();

Ionic Example

In this example the application is minimized by pressing the back button

$ionicPlatform.registerBackButtonAction(function (event) {
    event.preventDefault();
    window.plugins.appMinimize.minimize();
}, 100);
  
$ionicPlatform.registerBackButtonAction(function (event) {
    event.preventDefault();
    window.plugins.appMinimize.sendToBackground();
}, 100);

TypeScript Example

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();
});
  
this.platform.registerBackButtonAction(() => {
    this.appMinimize.sendToBackground();
});

About

This is a cordova plugin to minimize (or send to backrgound) the application on android devices

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 65.3%
  • JavaScript 34.7%