Maikon Igor
Maikon Igor
you can call the wakeUp method at a given time. ``` const timer = 4*60*1000; // four minutes this.backgroundMode.enable(); this.backgroundMode.on('activate') .subscribe(()=>{ setInterval(()=>{ this.backgroundMode.wakeUp(); this.backgroundMode.moveToForeground(); },timer); }); ```
you can call the wakeUp method at a given time. ``` const timer = 4*60*1000; // four minutes this.backgroundMode.enable(); this.backgroundMode.on('activate') .subscribe(()=>{ setInterval(()=>{ this.backgroundMode.disableBatteryOptimizations(); this.backgroundMode.disableWebViewOptimizations(); this.backgroundMode.wakeUp(); this.backgroundMode.moveToForeground(); },timer); }); ```
You can call the wakeUp method in a given interval to keep the app awake. ``` const timer = 4*60*1000; // four minutes this.backgroundMode.enable(); this.backgroundMode.on('activate') .subscribe(()=>{ setInterval(()=>{ this.backgroundMode.wakeUp(); this.backgroundMode.moveToForeground(); },timer);...