NotificationManager Class
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.
Class to notify the user of events that happen.
[Android.Runtime.Register("android/app/NotificationManager", DoNotGenerateAcw=true)]
public class NotificationManager : Java.Lang.Object
[<Android.Runtime.Register("android/app/NotificationManager", DoNotGenerateAcw=true)>]
type NotificationManager = class
inherit Object
- Inheritance
- Attributes
Remarks
Android platform documentation
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.
Constructors
| NotificationManager(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Fields
| ActionAppBlockStateChanged |
Intent that is broadcast when an application is blocked or unblocked. |
| ActionAutomaticZenRule |
Activity Action: Launch an Automatic Zen Rule configuration screen |
| ActionAutomaticZenRuleStatusChanged |
Intent that is broadcast when the status of an |
| ActionInterruptionFilterChanged |
Intent that is broadcast when the state of getCurrentInterruptionFilter() changes. |
| ActionNotificationChannelBlockStateChanged |
Intent that is broadcast when a |
| ActionNotificationChannelGroupBlockStateChanged |
Intent that is broadcast when a |
| ActionNotificationPolicyAccessGrantedChanged |
Intent that is broadcast when the state of |
| ActionNotificationPolicyChanged |
Intent that is broadcast when the state of getNotificationPolicy() changes. |
| AutomaticRuleStatusDisabled |
Obsolete.
Constant value for |
| AutomaticRuleStatusEnabled |
Obsolete.
Constant value for |
| AutomaticRuleStatusRemoved |
Obsolete.
Constant value for |
| AutomaticRuleStatusUnknown |
Obsolete.
Constant value for |
| BubblePreferenceAll |
Obsolete.
Indicates that all bubbles are allowed from the app. |
| BubblePreferenceNone |
Obsolete.
Indicates that the no bubbles are allowed from the app. |
| BubblePreferenceSelected |
Obsolete.
Indicates that only notifications selected by the user will appear as bubbles. |
| ExtraAutomaticRuleId |
Used as an optional string extra on |
| ExtraAutomaticZenRuleId |
String extra for |
| ExtraAutomaticZenRuleStatus |
Integer extra for |
| ExtraBlockedState |
Extra for |
| ExtraNotificationChannelGroupId |
Extra for |
| ExtraNotificationChannelId |
Extra for |
| ImportanceDefault |
Obsolete.
Default notification importance: shows everywhere, makes noise, but does not visually intrude. |
| ImportanceHigh |
Obsolete.
Higher notification importance: shows everywhere, makes noise and peeks. |
| ImportanceLow |
Obsolete.
Low notification importance: Shows in the shade, and potentially in the status bar
(see |
| ImportanceMax |
Obsolete.
Unused. |
| ImportanceMin |
Obsolete.
Min notification importance: only shows in the shade, below the fold. |
| ImportanceNone |
Obsolete.
A notification with no importance: does not show in the shade. |
| ImportanceUnspecified |
Obsolete.
Value signifying that the user has not expressed an importance. |
| MetaDataAutomaticRuleType |
A required |
| MetaDataRuleInstanceLimit | |
Properties
| AutomaticZenRules |
Returns AutomaticZenRules owned by the caller. |
| BubblePreference |
Gets the bubble preference for the app. |
| Class |
Returns the runtime class of this |
| ConsolidatedNotificationPolicy |
Returns the currently applied notification policy. |
| CurrentInterruptionFilter |
Gets the current notification interruption filter. |
| Handle |
The handle to the underlying Android instance. (Inherited from Object) |
| Importance |
Returns the user specified importance for notifications from the calling package. |
| IsNotificationPolicyAccessGranted |
Checks the ability to modify notification do not disturb policy for the calling package. |
| JniIdentityHashCode | (Inherited from Object) |
| JniPeerMembers | |
| NotificationChannelGroups |
Returns all notification channel groups belonging to the calling app. |
| NotificationChannels |
Returns all notification channels belonging to the calling package. |
| NotificationDelegate |
Returns the |
| NotificationPolicy |
Gets the current user-specified default notification policy. -or- Sets the current notification policy. |
| PeerReference | (Inherited from Object) |
| ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
| ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
| AddAutomaticZenRule(AutomaticZenRule) |
Creates the given zen rule. |
| AreBubblesAllowed() |
Obsolete.
Gets whether all notifications posted by this app can appear outside of the notification shade, floating over other apps' content. |
| AreBubblesEnabled() |
Returns whether bubbles are enabled at the feature level for the current user. |
| AreNotificationsEnabled() |
Returns whether notifications from the calling package are blocked. |
| AreNotificationsPaused() |
Returns whether notifications from this package are temporarily hidden. |
| Cancel(Int32) |
Cancels a previously posted notification. |
| Cancel(String, Int32) |
Cancels a previously posted notification. |
| CancelAll() |
Cancel all previously shown notifications. |
| CancelAsPackage(String, String, Int32) |
Cancels a previously posted notification. |
| CanNotifyAsPackage(String) |
Returns whether you are allowed to post notifications on behalf of a given package, with
|
| Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
| CreateNotificationChannel(NotificationChannel) |
Creates a notification channel that notifications can be posted to. |
| CreateNotificationChannelGroup(NotificationChannelGroup) |
Creates a group container for |
| CreateNotificationChannelGroups(IList<NotificationChannelGroup>) |
Creates multiple notification channel groups. |
| CreateNotificationChannels(IList<NotificationChannel>) |
Creates multiple notification channels that different notifications can be posted to. |
| DeleteNotificationChannel(String) |
Deletes the given notification channel. |
| DeleteNotificationChannelGroup(String) |
Deletes the given notification channel group, and all notification channels that belong to it. |
| Dispose() | (Inherited from Object) |
| Dispose(Boolean) | (Inherited from Object) |
| Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
| FromContext(Context) | |
| GetActiveNotifications() |
Recover a list of active notifications: ones that have been posted by the calling app that
have not yet been dismissed by the user or |
| GetAutomaticZenRule(String) |
Returns the AutomaticZenRule with the given id, if it exists and the caller has access. |
| GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
| 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
|
| GetNotificationChannelGroup(String) |
Returns the notification channel group settings for a given channel group id. |
| IsNotificationListenerAccessGranted(ComponentName) |
Checks whether the user has approved a given
|
| JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
| Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
| Notify(Int32, Notification) |
Post a notification to be shown in the status bar. |
| Notify(String, Int32, Notification) |
Posts a notification to be shown in the status bar. |
| NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
| NotifyAsPackage(String, String, Int32, Notification) |
Posts a notification as a specified package to be shown in the status bar. |
| RemoveAutomaticZenRule(String) |
Deletes the automatic zen rule with the given id. |
| SetAutomaticZenRuleState(String, Condition) |
Informs the notification manager that the state of an |
| SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
| SetInterruptionFilter(InterruptionFilter) |
Sets the current notification interruption filter. |
| ShouldHideSilentStatusBarIcons() |
Returns whether the user wants silent notifications (see |
| ToArray<T>() | (Inherited from Object) |
| ToString() |
Returns a string representation of the object. (Inherited from Object) |
| UnregisterFromRuntime() | (Inherited from Object) |
| UpdateAutomaticZenRule(String, AutomaticZenRule) |
Updates the given zen rule. |
| Wait() |
Causes the current thread to wait until another thread invokes the
|
| Wait(Int64) |
Causes the current thread to wait until either another thread invokes the
|
| Wait(Int64, Int32) |
Causes the current thread to wait until another thread invokes the
|
Explicit Interface Implementations
| IJavaPeerable.Disposed() | (Inherited from Object) |
| IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
| IJavaPeerable.Finalized() | (Inherited from Object) |
| IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
| IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| GetJniTypeName(IJavaPeerable) | |