NotificationManager.Policy 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| NotificationManager.Policy(IntPtr, JniHandleOwnership) |
初始化现有 Java Native Interface 对象的托管表示形式。 |
| NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders) |
为“请勿打扰”优先级模式行为构造策略。 |
| NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32) |
为“请勿打扰”优先级模式行为构造策略。 |
| NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32, Int32) |
为“请勿打扰”优先级模式行为构造策略。 |
NotificationManager.Policy(IntPtr, JniHandleOwnership)
初始化现有 Java Native Interface 对象的托管表示形式。
protected Policy(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.NotificationManager.Policy : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.NotificationManager.Policy
参数
- javaReference
-
IntPtr
nativeint
Java Native Interface 对象引用。
- transfer
- JniHandleOwnership
要应用于 Java Native Interface 对象引用的所有权转让。
注解
当为现有Java对象创建托管对等时,此构造函数由 Android 绑定运行时的 .NET 调用。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders)
为“请勿打扰”优先级模式行为构造策略。
[Android.Runtime.Register(".ctor", "(III)V", "", ApiSince=23)]
public Policy(Android.App.NotificationPriorityCategory priorityCategories, Android.App.NotificationPrioritySenders priorityCallSenders, Android.App.NotificationPrioritySenders priorityMessageSenders);
[<Android.Runtime.Register(".ctor", "(III)V", "", ApiSince=23)>]
new Android.App.NotificationManager.Policy : Android.App.NotificationPriorityCategory * Android.App.NotificationPrioritySenders * Android.App.NotificationPrioritySenders -> Android.App.NotificationManager.Policy
参数
- priorityCategories
- NotificationPriorityCategory
可以绕过 DND 的通知类别的位掩码。
- priorityCallSenders
- NotificationPrioritySenders
哪些调用方可以绕过 DND。
- priorityMessageSenders
- NotificationPrioritySenders
哪些邮件发件人可以绕过 DND。
- 特性
注解
为“请勿打扰”优先级模式行为构造策略。 面向低于Build.VERSION_CODES API 级别的应用。P 无法更改用户指定的值,以允许或禁止Policy.PRIORITY_CATEGORY_ALARMS、Policy.PRIORITY_CATEGORY_SYSTEM和Policy.PRIORITY_CATEGORY_MEDIA绕过 dnd。
Android 参考。android.app.NotificationManager.Policy.Policy
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32)
为“请勿打扰”优先级模式行为构造策略。
[Android.Runtime.Register(".ctor", "(IIII)V", "", ApiSince=24)]
public Policy(Android.App.NotificationPriorityCategory priorityCategories, Android.App.NotificationPrioritySenders priorityCallSenders, Android.App.NotificationPrioritySenders priorityMessageSenders, int suppressedVisualEffects);
[<Android.Runtime.Register(".ctor", "(IIII)V", "", ApiSince=24)>]
new Android.App.NotificationManager.Policy : Android.App.NotificationPriorityCategory * Android.App.NotificationPrioritySenders * Android.App.NotificationPrioritySenders * int -> Android.App.NotificationManager.Policy
参数
- priorityCategories
- NotificationPriorityCategory
可以绕过 DND 的通知类别的位掩码。
- priorityCallSenders
- NotificationPrioritySenders
哪些调用方可以绕过 DND。
- priorityMessageSenders
- NotificationPrioritySenders
哪些邮件发件人可以绕过 DND。
- suppressedVisualEffects
- Int32
应从 DND 筛选的通知中禁止显示哪些视觉中断。
- 特性
注解
为“请勿打扰”优先级模式行为构造策略。 面向低于Build.VERSION_CODES API 级别的应用。R 无法更改用户指定的值以允许或禁止Policy.PRIORITY_CATEGORY_CONVERSATIONS绕过 dnd。 此外,面向 API 级别低于Build.VERSION_CODES的应用。P 只能修改抑制的视觉效果字段的SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF位。 所有其他抑制效果将被忽略,并从屏幕上和屏幕关闭值重新生成。 面向Build.VERSION_CODES的应用。P 或更高版本可以设置任何抑制的视觉效果。 但是,如果设置了任何抑制效果 > SUPPRESSED_EFFECT_SCREEN_ON,将忽略SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF,并从更具体的禁止显示视觉效果位重新构造。 应用应迁移到面向特定效果,而不是弃用SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF效果。
Android 参考。android.app.NotificationManager.Policy.Policy
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32, Int32)
为“请勿打扰”优先级模式行为构造策略。
[Android.Runtime.Register(".ctor", "(IIIII)V", "", ApiSince=30)]
public Policy(Android.App.NotificationPriorityCategory priorityCategories, Android.App.NotificationPrioritySenders priorityCallSenders, Android.App.NotificationPrioritySenders priorityMessageSenders, int suppressedVisualEffects, int priorityConversationSenders);
[<Android.Runtime.Register(".ctor", "(IIIII)V", "", ApiSince=30)>]
new Android.App.NotificationManager.Policy : Android.App.NotificationPriorityCategory * Android.App.NotificationPrioritySenders * Android.App.NotificationPrioritySenders * int * int -> Android.App.NotificationManager.Policy
参数
- priorityCategories
- NotificationPriorityCategory
可以绕过 DND 的通知类别的位掩码。
- priorityCallSenders
- NotificationPrioritySenders
哪些调用方可以绕过 DND。
- priorityMessageSenders
- NotificationPrioritySenders
哪些邮件发件人可以绕过 DND。
- suppressedVisualEffects
- Int32
应从 DND 筛选的通知中禁止显示哪些视觉中断。
- priorityConversationSenders
- Int32
int:值是下列值之一:CONVERSATION_SENDERS_ANYONE CONVERSATION_SENDERS_IMPORTANT CONVERSATION_SENDERS_NONE
- 特性
注解
为“请勿打扰”优先级模式行为构造策略。 面向低于Build.VERSION_CODES API 级别的应用。P 无法更改用户指定的值以允许或禁止Policy.PRIORITY_CATEGORY_CONVERSATIONS绕过 dnd。 如果需要更改它们,请使用与 AutomaticZenRule 关联的 ZenPolicy,而不是更改全局设置。 面向低于Build.VERSION_CODES API 级别的应用。P 无法更改用户指定的值,以允许或禁止Policy.PRIORITY_CATEGORY_ALARMS、Policy.PRIORITY_CATEGORY_SYSTEM和Policy.PRIORITY_CATEGORY_MEDIA绕过 dnd。 此外,面向 API 级别低于Build.VERSION_CODES的应用。P 只能修改抑制的视觉效果字段的SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF位。 所有其他抑制效果将被忽略,并从屏幕上和屏幕关闭值重新生成。 面向Build.VERSION_CODES的应用。P 或更高版本可以设置任何抑制的视觉效果。 但是,如果设置了任何抑制效果 > SUPPRESSED_EFFECT_SCREEN_ON,将忽略SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF,并从更具体的禁止显示视觉效果位重新构造。 应用应迁移到面向特定效果,而不是弃用SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF效果。
Android 参考。android.app.NotificationManager.Policy.Policy
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。