Show / Hide Table of Contents

Class AN_NotificationManager

Class to notify the user of events that happen. This is how you tell the user that something has happened in the background.

Inheritance
System.Object
AN_NotificationManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: SA.Android.App
Assembly: cs.temp.dll.dll
Syntax
public static class AN_NotificationManager

Properties

LastOpenedNotificationRequest

Contains the last Notification Request opened by a user, via the notification banner click Make sense to check this filed value on your app start. Before you subscribe to OnNotificationClick

If value is not null, it mean that user has launched your app by clicking on notification banner. You can analyse the AN_NotificationRequest that caused clicked notification to show up, for better understanding the context user launched your app in.

Declaration
public static AN_NotificationRequest LastOpenedNotificationRequest { get; }
Property Value
Type Description
AN_NotificationRequest

OnNotificationClick

The event is fired when user clicked on local notification banner

Declaration
public static SA_iEvent<AN_NotificationRequest> OnNotificationClick { get; }
Property Value
Type Description
SA_iEvent<AN_NotificationRequest>

OnNotificationReceived

Event fired when local notification received

Declaration
public static SA_iEvent<AN_NotificationRequest> OnNotificationReceived { get; }
Property Value
Type Description
SA_iEvent<AN_NotificationRequest>

Methods

Cancel(Int32)

Cancel a previously shown notification. If it's transient, the view will be hidden. If it's persistent, it will be removed from the status bar.

Declaration
public static void Cancel(int Identifier)
Parameters
Type Name Description
System.Int32 Identifier

Notification request id

CancelAll()

Cancel all previously shown notifications.

Declaration
public static void CancelAll()

CreateNotificationChannel(AN_NotificationChannel)

Creates a notification channel that notifications can be posted to. This can also be used to restore a deleted channel and to update an existing channel's name, description, group, and/or importance.

The name and description should only be changed if the locale changes or in response to the user renaming this channel. For example, if a user has a channel named 'John Doe' that represents messages from a 'John Doe', and 'John Doe' changes his name to 'John Smith,' the channel can be renamed to match.

The importance of an existing channel will only be changed if the new importance is lower than the current value and the user has not altered any settings on this channel.

The group an existing channel will only be changed if the channel does not already belong to a group. All other fields are ignored for channels that already exist.

Declaration
public static void CreateNotificationChannel(AN_NotificationChannel channel)
Parameters
Type Name Description
AN_NotificationChannel channel

The channel to create. Note that the created channel may differ from this value. If the provided channel is malformed, a RemoteException will be thrown. This value must never be null.

DeleteNotificationChannel(String)

Deletes the given notification channel. If you CreateNotificationChannel(AN_NotificationChannel) with this same id, the deleted channel will be un-deleted with all of the same settings it had before it was deleted.

Declaration
public static void DeleteNotificationChannel(string channelId)
Parameters
Type Name Description
System.String channelId

Channel id

GetNotificationChannel(String)

Returns the notification channel settings for a given channel id. T he channel must belong to your package, or it will not be returned.

Declaration
public static AN_NotificationChannel GetNotificationChannel(string channelId)
Parameters
Type Name Description
System.String channelId

Channel id

Returns
Type Description
AN_NotificationChannel

GetNotificationChannels()

Returns all notification channels belonging to the calling package.

Declaration
public static List<AN_NotificationChannel> GetNotificationChannels()
Returns
Type Description
List<AN_NotificationChannel>

Schedule(AN_NotificationRequest)

Schedules a local notification for delivery. See Cancel(Int32) for the detailed behavior.

Declaration
public static void Schedule(AN_NotificationRequest request)
Parameters
Type Name Description
AN_NotificationRequest request

The notification request to schedule.This parameter must not be null.

Unschedule(AN_NotificationRequest)

Unschedule the specified notification request.

Declaration
public static void Unschedule(AN_NotificationRequest request)
Parameters
Type Name Description
AN_NotificationRequest request

request to Unschedule.

Unschedule(Int32)

Unschedule the specified notification request by id

Declaration
public static void Unschedule(int Identifier)
Parameters
Type Name Description
System.Int32 Identifier

notification request id

UnscheduleAll()

Declaration
public static void UnscheduleAll()
In This Article
Back to top Generated by DocFX