I'm using BackgroundMode plugin in Ionic 4 and it works fine when I minimize the app, but I clean it form recent apps it stops sending data. Is there any way to keep it running?
app.component.ts
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
this.backgroundMode.enable();
this.backgroundMode.on('activate').subscribe(() => {
console.log('activated background mode');
this.backgroundMode.disableWebViewOptimizations();
});
});
}