2017-05-19 195 views

回答

0

您可以使用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(); 
相關問題