语言

NotificationManager.CreateNotificationChannelGroup 方法

定义

为 NotificationChannel 对象创建组容器。

[Android.Runtime.Register("createNotificationChannelGroup", "(Landroid/app/NotificationChannelGroup;)V", "GetCreateNotificationChannelGroup_Landroid_app_NotificationChannelGroup_Handler", ApiSince=26)]
public virtual void CreateNotificationChannelGroup(Android.App.NotificationChannelGroup group);
[<Android.Runtime.Register("createNotificationChannelGroup", "(Landroid/app/NotificationChannelGroup;)V", "GetCreateNotificationChannelGroup_Landroid_app_NotificationChannelGroup_Handler", ApiSince=26)>]
abstract member CreateNotificationChannelGroup : Android.App.NotificationChannelGroup -> unit
override this.CreateNotificationChannelGroup : Android.App.NotificationChannelGroup -> unit

参数

group
NotificationChannelGroup

NotificationChannelGroup:要创建的组。 此值不能为 null。

特性

注解

为 NotificationChannel 对象创建组容器。 这可用于重命名现有组。 组信息仅用于演示,而不适用于行为。 组对于频道是可选的,你可以混合使用属于不属于该通道的组和通道。

例如,如果应用程序支持多个帐户,并且这些帐户将具有类似的通道,则可以为每个具有帐户特定标签的帐户创建一个组,而不是将帐户信息追加到每个通道的标签。

Android 参考。android.app.NotificationManager.createNotificationChannelGroup

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于