NotificationManager.GetNotificationChannel 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 |
|---|---|
| GetNotificationChannel(String) |
Retourne les paramètres du canal de notification pour un ID de canal donné. |
| GetNotificationChannel(String, String) |
Retourne les paramètres du canal de notification pour un canal et un ID de conversation donnés. |
GetNotificationChannel(String)
Retourne les paramètres du canal de notification pour un ID de canal donné.
[Android.Runtime.Register("getNotificationChannel", "(Ljava/lang/String;)Landroid/app/NotificationChannel;", "GetGetNotificationChannel_Ljava_lang_String_Handler", ApiSince=26)]
public virtual Android.App.NotificationChannel? GetNotificationChannel(string? channelId);
[<Android.Runtime.Register("getNotificationChannel", "(Ljava/lang/String;)Landroid/app/NotificationChannel;", "GetGetNotificationChannel_Ljava_lang_String_Handler", ApiSince=26)>]
abstract member GetNotificationChannel : string -> Android.App.NotificationChannel
override this.GetNotificationChannel : string -> Android.App.NotificationChannel
Paramètres
- channelId
- String
String
Retours
- Attributs
Remarques
Retourne les paramètres du canal de notification pour un ID de canal donné. Le canal doit appartenir à votre package ou à un package pour lequel vous êtes délégué de notification approuvé (voir canNotifyAsPackage(String)) ou il ne sera pas retourné. Pour interroger un canal en tant que délégué de notification, appelez cette méthode à partir d’un contexte créé pour ce package (voir Context.createPackageContext(String,int)).
Référence Android pour android.app.NotificationManager.getNotificationChannel.
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 à
GetNotificationChannel(String, String)
Retourne les paramètres du canal de notification pour un canal et un ID de conversation donnés.
[Android.Runtime.Register("getNotificationChannel", "(Ljava/lang/String;Ljava/lang/String;)Landroid/app/NotificationChannel;", "GetGetNotificationChannel_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)]
public virtual Android.App.NotificationChannel? GetNotificationChannel(string channelId, string conversationId);
[<Android.Runtime.Register("getNotificationChannel", "(Ljava/lang/String;Ljava/lang/String;)Landroid/app/NotificationChannel;", "GetGetNotificationChannel_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)>]
abstract member GetNotificationChannel : string * string -> Android.App.NotificationChannel
override this.GetNotificationChannel : string * string -> Android.App.NotificationChannel
Paramètres
- channelId
- String
Chaîne : cette valeur ne peut pas être null.
- conversationId
- String
Chaîne : cette valeur ne peut pas être null.
Retours
- Attributs
Remarques
Retourne les paramètres du canal de notification pour un canal et un ID de conversation donnés. Le canal doit appartenir à votre package ou à un package pour lequel vous êtes délégué de notification approuvé (voir canNotifyAsPackage(String)) ou il ne sera pas retourné. Pour interroger un canal en tant que délégué de notification, appelez cette méthode à partir d’un contexte créé pour ce package (voir Context.createPackageContext(String,int)).
Si un canal de conversation avec l’ID de conversation donné est introuvable, cette méthode retourne plutôt le canal parent avec l’ID de canal donné, ou null s’il n’existe aucun des deux.
Référence Android pour android.app.NotificationManager.getNotificationChannel.
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.