mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-14 04:05:23 +08:00
43 lines
973 B
TypeScript
43 lines
973 B
TypeScript
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|
import { Injectable } from '@angular/core';
|
|
|
|
/**
|
|
* @name App Minimize
|
|
* @description
|
|
* AppMinimize is a plugin to minimize the application on android devices
|
|
*
|
|
* @usage
|
|
* ```typescript
|
|
* import { AppMinimize } from '@ionic-native/app-minimize';
|
|
*
|
|
*
|
|
* constructor(private appMinimize: AppMinimize) { }
|
|
*
|
|
* ...
|
|
*
|
|
* this.plugin.minimize().then(
|
|
* success => console.log('Closed'),
|
|
* err => console.log('Something went wrong')
|
|
* );
|
|
*
|
|
* ```
|
|
*/
|
|
@Plugin({
|
|
pluginName: 'AppMinimize',
|
|
plugin: 'https://github.com/tomloprod/cordova-plugin-appminimize.git',
|
|
pluginRef: 'plugins.appMinimize',
|
|
repo: 'https://github.com/tomloprod/cordova-plugin-appminimize',
|
|
platforms: ['Android']
|
|
})
|
|
@Injectable()
|
|
export class AppMinimize extends IonicNativePlugin {
|
|
|
|
/**
|
|
* Minimizes the application
|
|
* @return {Promise<any>}
|
|
*/
|
|
@Cordova()
|
|
minimize(): Promise<any> { return; }
|
|
|
|
}
|