(自动启动)Autostart

Autostart

每次启动或自动更新应用程序后,此插件将自动启动您的Android应用程序。 您可以在应用程序中启用或禁用自动启动功能。
Repo(备用): https://github.com/ToniKorin/cordova-plugin-autostart

Installation(安装)

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

$ ionic cordova plugin add cordova-plugin-autostart
$ npm install --save @ionic-native/autostart

2.添加插件到app's module

Supported platforms(支持平台)

Android

Usage(用法)

import { Autostart } from '@ionic-native/autostart';


constructor(private autostart: Autostart) { }

...

this.autostart.enable();

this.autostart.disable();

Instance Members(实例成员)

enable()

启动后启用自动启动
disable()

启动后禁用自动启动

你可能感兴趣的:((自动启动)Autostart)