Share via


NotificationListenerService.CancelAllNotifications Metodo

Definizione

Informare il gestore delle notifiche sulla chiusura di tutte le notifiche.

[Android.Runtime.Register("cancelAllNotifications", "()V", "")]
public void CancelAllNotifications ();
[<Android.Runtime.Register("cancelAllNotifications", "()V", "")>]
member this.CancelAllNotifications : unit -> unit
Attributi

Commenti

Informare il gestore delle notifiche sulla chiusura di tutte le notifiche.

Usare questa opzione se il listener ha un'interfaccia utente che consente all'utente di ignorare tutte le notifiche, in modo analogo al comportamento della barra di stato e del pannello di notifica di Android. Deve essere chiamato dopo che l'utente richiama la funzione "ignora tutto" dell'interfaccia utente; dopo essere informato, gestione notifiche rimuoverà effettivamente tutte le notifiche attive e si otterranno più #onNotificationRemoved(StatusBarNotification) callback.

Il servizio deve attendere l'evento #onListenerConnected() prima di eseguire questa operazione.

#cancelNotification(String, String, int)

Documentazione java per android.service.notification.NotificationListenerService.cancelAllNotifications().

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal Android e usato in base ai termini descritti in 2.5 Attribution License Creative Commons 2.5 Attribution License.

Si applica a

Vedi anche

  • <xref:Android.Service.Notification.NotificationListenerService.CancelNotification(System.String%2c+System.String%2c+System.String)>