1
I want my app to show a progress bar when I start a download or upload. For this I am using fileTransfer plugins, local Notifications. The progress value is given according to the change of a variable that receives the value of an observable. when updating the notification I used the update method, but every update it vibrates again.
NOTE: When the phone has volume, it does not vibrate, result I want to achieve in silent.
Pagnas visited:
https://ionicframework.com/docs/native/local-notifications
https://github.com/katzer/cordova-plugin-local-notifications
this.apiService.getContObservable().subscribe(res => {
console.log('Novo Valor: ', res)
if (res == 1) {
this.cont = res / 100
this.aux = res
this.criarNoficacao()
} else if (res == 100) {
this.cont = 0
this.aux = 0
} else {
this.cont = res / 100
this.aux = res
this.notificacao.update({
id: 1,
sound: null,
vibrate : null,
progressBar: { value: this.aux }
});
}
})