[英]How I can launch my app in startup device with cordova?
您可以使用cordova-plugin-autostart自动启动应用程序。
一步步:
从CLI安装最新版本的插件:
cordova plugin add cordova-plugin-autostart@latest
或从主分支:
cordova plugin add https://github.com/ToniKorin/cordova-plugin-autostart.git
启用自动启动:
cordova.plugins.autoStart.enable();
Ionic2示例:
文件: 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();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.