Good day I have a function that runs in the constructor and I activate it with
background:
enviarDatingos(nMinuto){
//let nDuracion = 1000*60*nMinuto;
let nDuracion = 1000*nMinuto;
//console.log(this.backgroundMode.enable());
// Empezamos a enviar dato de acuerdo al parametro nMinutos
setInterval(() => {
//Aqui ejecutamos el servicio
//console.log(this.contador);
this.backgroundMode.enable();
this.contador++;
},nDuracion);
}
Then I have another one to stop:
parar(){
this.backgroundMode.disable();
}
In the browser does not work for cordova, installed in the device does not work either, no error, someone knows why does not that native library work?