mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(app-minimize): add AppMinimize plugin (#1501)
* typo(barcode-scanner): fixe circle lint error * typo(docs): Unified the documentations In some plugins the typescript markup was missing. I also unified the console.log string from console.log("hello") to console.log('Hello') so any plugin page look the same. * Added AppMinimize plugin * promisse * usage
This commit is contained in:
parent
14f38a0e28
commit
d25b2f16a9
42
src/@ionic-native/plugins/app-minimize/index.ts
Normal file
42
src/@ionic-native/plugins/app-minimize/index.ts
Normal file
@ -0,0 +1,42 @@
|
||||
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: 'cordova.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; }
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user