如何在cordova启动我的应用程序启动设备?

问题描述:

我想在启动时启动应用程序,我该怎么做?如何在cordova启动我的应用程序启动设备?

我了解https://github.com/olaferlandsen/cordova-plugin-autostart 但它不工作以及

感谢

您可以使用cordova-plugin-autostart自动启动你的应用程序。

一步一步:

从CLI安装插件:

cordova plugin rm cordova-plugin-autostart 

启用AUTOSTART:

cordova.plugins.autoStart.enable(); 

例Ionic2:

FILE:app.component.ts

declare let cordova : any; 
export class MyApp { 
    rootPage:any = HomePage; 
    constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 
     platform.ready().then(() => { 
      cordova.plugins.autoStart.enable();