(自动启动)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()

启动后禁用自动启动

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容