NotificationManager.Policy Constructors
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
NotificationManager.Policy(IntPtr, JniHandleOwnership) | |
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders) |
Constructs a policy for Do Not Disturb priority mode behavior. |
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32) |
Constructs a policy for Do Not Disturb priority mode behavior. |
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32, Int32) |
Constructs a policy for Do Not Disturb priority mode behavior. |
NotificationManager.Policy(IntPtr, JniHandleOwnership)
protected Policy (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.NotificationManager.Policy : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.NotificationManager.Policy
Parameters
- javaReference
-
IntPtr
nativeint
- transfer
- JniHandleOwnership
Remarks
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
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders)
Constructs a policy for Do Not Disturb priority mode behavior.
[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
Parameters
- priorityCategories
- NotificationPriorityCategory
bitmask of categories of notifications that can bypass DND.
- priorityCallSenders
- NotificationPrioritySenders
which callers can bypass DND.
- priorityMessageSenders
- NotificationPrioritySenders
which message senders can bypass DND.
- Attributes
Remarks
Constructs a policy for Do Not Disturb priority mode behavior.
Apps that target API levels below Build.VERSION_CODES#P
cannot change user-designated values to allow or disallow Policy#PRIORITY_CATEGORY_ALARMS
, Policy#PRIORITY_CATEGORY_SYSTEM
, and Policy#PRIORITY_CATEGORY_MEDIA
from bypassing dnd.
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
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32)
Constructs a policy for Do Not Disturb priority mode behavior.
[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
Parameters
- priorityCategories
- NotificationPriorityCategory
bitmask of categories of notifications that can bypass DND.
- priorityCallSenders
- NotificationPrioritySenders
which callers can bypass DND.
- priorityMessageSenders
- NotificationPrioritySenders
which message senders can bypass DND.
- suppressedVisualEffects
- Int32
which visual interruptions should be suppressed from notifications that are filtered by DND.
- Attributes
Remarks
Constructs a policy for Do Not Disturb priority mode behavior.
Apps that target API levels below Build.VERSION_CODES#R
cannot change user-designated values to allow or disallow Policy#PRIORITY_CATEGORY_CONVERSATIONS
, from bypassing dnd.
Additionally, apps that target API levels below Build.VERSION_CODES#P
can only modify the #SUPPRESSED_EFFECT_SCREEN_ON
and #SUPPRESSED_EFFECT_SCREEN_OFF
bits of the suppressed visual effects field. All other suppressed effects will be ignored and reconstituted from the screen on and screen off values.
Apps that target Build.VERSION_CODES#P
or above can set any suppressed visual effects. However, if any suppressed effects > #SUPPRESSED_EFFECT_SCREEN_ON
are set, #SUPPRESSED_EFFECT_SCREEN_ON
and #SUPPRESSED_EFFECT_SCREEN_OFF
will be ignored and reconstituted from the more specific suppressed visual effect bits. Apps should migrate to targeting specific effects instead of the deprecated #SUPPRESSED_EFFECT_SCREEN_ON
and #SUPPRESSED_EFFECT_SCREEN_OFF
effects.
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
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32, Int32)
Constructs a policy for Do Not Disturb priority mode behavior.
[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
Parameters
- priorityCategories
- NotificationPriorityCategory
bitmask of categories of notifications that can bypass DND.
- priorityCallSenders
- NotificationPrioritySenders
which callers can bypass DND.
- priorityMessageSenders
- NotificationPrioritySenders
which message senders can bypass DND.
- suppressedVisualEffects
- Int32
which visual interruptions should be suppressed from notifications that are filtered by DND.
- priorityConversationSenders
- Int32
- Attributes
Remarks
Constructs a policy for Do Not Disturb priority mode behavior.
Apps that target API levels below Build.VERSION_CODES#P
cannot change user-designated values to allow or disallow Policy#PRIORITY_CATEGORY_CONVERSATIONS
from bypassing dnd. If you do need to change them, use a ZenPolicy
associated with an AutomaticZenRule
instead of changing the global setting.
Apps that target API levels below Build.VERSION_CODES#P
cannot change user-designated values to allow or disallow Policy#PRIORITY_CATEGORY_ALARMS
, Policy#PRIORITY_CATEGORY_SYSTEM
, and Policy#PRIORITY_CATEGORY_MEDIA
from bypassing dnd.
Additionally, apps that target API levels below Build.VERSION_CODES#P
can only modify the #SUPPRESSED_EFFECT_SCREEN_ON
and #SUPPRESSED_EFFECT_SCREEN_OFF
bits of the suppressed visual effects field. All other suppressed effects will be ignored and reconstituted from the screen on and screen off values.
Apps that target Build.VERSION_CODES#P
or above can set any suppressed visual effects. However, if any suppressed effects > #SUPPRESSED_EFFECT_SCREEN_ON
are set, #SUPPRESSED_EFFECT_SCREEN_ON
and #SUPPRESSED_EFFECT_SCREEN_OFF
will be ignored and reconstituted from the more specific suppressed visual effect bits. Apps should migrate to targeting specific effects instead of the deprecated #SUPPRESSED_EFFECT_SCREEN_ON
and #SUPPRESSED_EFFECT_SCREEN_OFF
effects.
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.