NotificationManager.Notify Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| Notify(Int32, Notification) |
Publiez une notification à afficher dans la barre d’état. |
| Notify(String, Int32, Notification) |
Publie une notification à afficher dans la barre d’état. |
Notify(Int32, Notification)
Publiez une notification à afficher dans la barre d’état.
[Android.Runtime.Register("notify", "(ILandroid/app/Notification;)V", "GetNotify_ILandroid_app_Notification_Handler")]
public virtual void Notify(int id, Android.App.Notification? notification);
[<Android.Runtime.Register("notify", "(ILandroid/app/Notification;)V", "GetNotify_ILandroid_app_Notification_Handler")>]
override this.Notify : int * Android.App.Notification -> unit
Paramètres
- id
- Int32
int : identificateur de cette notification unique au sein de votre application.
- notification
- Notification
Notification : objet notification décrivant ce qu’il faut afficher à l’utilisateur. Ne doit pas être null.
- Attributs
Remarques
Publiez une notification à afficher dans la barre d’état. Si une notification portant le même ID a déjà été publiée par votre application et n’a pas encore été annulée, elle sera remplacée par les informations mises à jour.
Référence Android pour android.app.NotificationManager.notify.
Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.
S’applique à
Notify(String, Int32, Notification)
Publie une notification à afficher dans la barre d’état.
[Android.Runtime.Register("notify", "(Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotify_Ljava_lang_String_ILandroid_app_Notification_Handler")]
public virtual void Notify(string? tag, int id, Android.App.Notification? notification);
[<Android.Runtime.Register("notify", "(Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotify_Ljava_lang_String_ILandroid_app_Notification_Handler")>]
override this.Notify : string * int * Android.App.Notification -> unit
Paramètres
- tag
- String
Chaîne : identificateur de chaîne pour cette notification. Peut être null.
- id
- Int32
int : identificateur de cette notification. La paire (balise, ID) doit être unique dans votre application.
- notification
- Notification
Notification : objet notification décrivant ce qu’il faut afficher à l’utilisateur. Ne doit pas être null.
- Attributs
Remarques
Publie une notification à afficher dans la barre d’état. Si une notification avec la même balise et l’ID ont déjà été publiées par votre application et qu’elles n’ont pas encore été annulées, elles sont remplacées par les informations mises à jour. Tous les services d’écouteur reçoivent Intent.FLAG_GRANT_READ_URI_PERMISSION l’accès aux URI fournis sur cette notification ou notification NotificationChannel à l’aide de Context.grantUriPermission(String,Uri,int). L’autorisation est révoquée lorsque la notification est annulée, ou vous pouvez révoquer des autorisations avec Context.revokeUriPermission(Uri,int).
Référence Android pour android.app.NotificationManager.notify.
Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.