Cordova原生插件

(App 最小化)App Minimize

2017-06-28  本文已影响35人  待花谢花开

App Minimize

AppMinimize is a plugin to minimize the application on android devices
Repo: https://github.com/tomloprod/cordova-plugin-appminimize

Installation(安装)

1.安装Cordova和Ionic原生插件:

$ ionic cordova plugin add cordova-plugin-appminimize
$ npm install --save @ionic-native/app-minimize

2.添加插件到 app's module

Supported platforms(支持平台)

Android

Usage(用法)

import { Platfrom } from 'ionic-angular';
import { AppMinimize } from '@ionic-native/app-minimize';


constructor(private platform: Platform, private appMinimize: AppMinimize) { }

...

this.platform.registerBackButtonAction(() => {
   this.appMinimize.minimize();
});

Instance Members(实例成员)

minimize()
最小化App
****Returns:** Promise<any>

上一篇下一篇

猜你喜欢

热点阅读