NotificationManager.GetNotificationChannel Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetNotificationChannel(String) |
Returns the notification channel settings for a given channel id. |
| GetNotificationChannel(String, String) |
Returns the notification channel settings for a given channel and conversation id. |
GetNotificationChannel(String)
Returns the notification channel settings for a given channel id.
[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
Parameters
- channelId
- String
String
Returns
- Attributes
Remarks
Returns the notification channel settings for a given channel id. The channel must belong to your package, or to a package you are an approved notification delegate for (see canNotifyAsPackage(String)), or it will not be returned. To query a channel as a notification delegate, call this method from a context created for that package (see Context.createPackageContext(String,int)).
Android reference for android.app.NotificationManager.getNotificationChannel.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetNotificationChannel(String, String)
Returns the notification channel settings for a given channel and conversation id.
[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
Parameters
- channelId
- String
String: This value cannot be null.
- conversationId
- String
String: This value cannot be null.
Returns
- Attributes
Remarks
Returns the notification channel settings for a given channel and conversation id. The channel must belong to your package, or to a package you are an approved notification delegate for (see canNotifyAsPackage(String)), or it will not be returned. To query a channel as a notification delegate, call this method from a context created for that package (see Context.createPackageContext(String,int)).
If a conversation channel with the given conversation id is not found, this method will instead return the parent channel with the given channel ID, or null if neither exists.
Android reference for android.app.NotificationManager.getNotificationChannel.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.