cordova - Ionic 2: backgroundMode is never enabled -
i trying make app work in background plugin backgroundmode. however, enable in code, it's never enabled. have imported it. code:
declare var cordova:any; console.log("started") document.addeventlistener('deviceready', function () { console.log("ready") cordova.plugins.backgroundmode.enable(); if(cordova.plugins.backgroundmode.isenablisactive()==true){ console.log("it works!") }}, false);
it prints out started
, ready
i have tried follow katzer's guide , solution, none of them worked me.
Comments
Post a Comment