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
GetNotificationChannel(String, String) |
Returns the notification channel settings for a given channel and
|
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
ShortcutInfo#getId() 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
- conversationId
- String
Returns
- Attributes
Remarks
Returns the notification channel settings for a given channel and ShortcutInfo#getId() 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)
).
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)
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
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)
).
Java documentation for android.app.NotificationManager.getNotificationChannel(java.lang.String)
.
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.