Class UM_Notification
System Notification model.
Inheritance
Inherited Members
Namespace: SA.CrossPlatform.Notifications
Assembly: cs.temp.dll.dll
Syntax
public class UM_Notification
Properties
BadgeNumber
The number to display as the app’s icon badge.
When the number in this property is 0, the system does not display a badge. When the number is greater than 0, the system displays the badge with the specified number.
Declaration
public int BadgeNumber { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Body
Gets the body.
Declaration
public string Body { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
IconName
Gets the name of the icon.
Declaration
public string IconName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
LargeIcon
Gets the large icon.
Declaration
public Texture2D LargeIcon { get; }
Property Value
| Type | Description |
|---|---|
| Texture2D |
SoundName
Gets the name of the sound.
Declaration
public string SoundName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Title
Gets the title.
Declaration
public string Title { get; }
Property Value
| Type | Description |
|---|---|
| System.String | The title. |
Methods
SetBadgeNumber(Int32)
Set notification badges number.
Declaration
public void SetBadgeNumber(int number)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | number | notification badges number. |
SetBody(String)
Set the second line of text in the platform notification template.
Declaration
public void SetBody(string body)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | body | Content Body. |
SetLargeIcon(Texture2D)
Add a large icon to the notification content view. In the platform template, this image will be shown on the left of the notification view in place of the small icon (which will be placed in a small badge atop the large icon).
Declaration
public void SetLargeIcon(Texture2D icon)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture2D | icon | Icon as Texture2D |
SetSmallIconName(String)
Set the small icon resource, which will be used to represent the notification in the status bar. Only use image resource name. Example: myIcon.png
Declaration
public void SetSmallIconName(string iconName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | iconName | A resource name inside your project. |
SetSoundName(String)
Set the sound to play, when notification received Only use sound resource name. Example: mySound.wav
Declaration
public void SetSoundName(string soundName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | soundName | A resource name inside your project. |
SetTitle(String)
Set the first line of text in the platform notification template.
Declaration
public void SetTitle(string title)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | title | Title. |