Mobile vibrating in silent mode even with the Vibrate : null property using the local notification plugin in Ionic

Asked

Viewed 15 times

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 }
    });
  
  }
})

1 answer

0

I discovered that in localNotification there is a property called Silent, which when defined as true does not allow the cell phone neither touch nor vibrate

Browser other questions tagged

You are not signed in. Login or sign up in order to post.