Airship Unity Plugin 10.0.0
  • AirshipSDK
  • AirshipPush
Public Member Functions | Public Attributes | List of all members
AirshipSDK.AirshipPush Class Reference

Airship Push. More...

+ Collaboration diagram for AirshipSDK.AirshipPush:
[legend]

Public Member Functions

void SetUserNotificationsEnabled (bool enabled)
 Enables/disables notifications on Airship.
 
bool IsUserNotificationEnabled ()
 Checks if user notifications are enabled or not on Airship.
 
IEnumerator EnableUserNotifications (EnabledUserPushNotificationsArgs? fallback, Action< bool > onComplete, Action< Exception > onError=null)
 Enables user notifications asynchronously using a coroutine.
 
IEnumerator GetNotificationStatus (Action< PushNotificationStatus > onComplete, Action< Exception > onError=null)
 Gets the notification status asynchronously using a coroutine.
 
string? GetPushToken ()
 Gets the registration token if generated.
 
IEnumerator GetActiveNotifications (Action< IEnumerable< PushMessage > > onComplete, Action< Exception > onError=null)
 Gets the list of active notifications asynchronously using a coroutine.
 
void ClearNotifications ()
 Clears all notifications for the app.
 
void ClearNotification (string identifier)
 Clears a specific notification.
 

Public Attributes

readonly IAirshipPushIOS iOS
 iOS only push methods.
 
readonly IAirshipPushAndroid android
 Android only push methods.
 

Detailed Description

Airship Push.

Member Function Documentation

◆ ClearNotification()

void AirshipSDK.AirshipPush.ClearNotification ( string  identifier)
inline

Clears a specific notification.

On Android, you can use this method to clear notifications outside of Airship. The identifier is in the format of <id>:<tag>.

Parameters
identifierThe identifier.

References AirshipSDK.List.

◆ ClearNotifications()

void AirshipSDK.AirshipPush.ClearNotifications ( )
inline

Clears all notifications for the app.

◆ EnableUserNotifications()

IEnumerator AirshipSDK.AirshipPush.EnableUserNotifications ( EnabledUserPushNotificationsArgs?  fallback,
Action< bool >  onComplete,
Action< Exception >  onError = null 
)
inline

Enables user notifications asynchronously using a coroutine.

This method does not block Unity's main thread.

Parameters
fallbackOptional fallback.
onCompleteCallback invoked with the permission result when the operation completes.
onErrorOptional callback invoked if an error occurs.
Returns
A coroutine that can be started with StartCoroutine.

References AirshipSDK.List.

◆ GetActiveNotifications()

IEnumerator AirshipSDK.AirshipPush.GetActiveNotifications ( Action< IEnumerable< PushMessage > >  onComplete,
Action< Exception >  onError = null 
)
inline

Gets the list of active notifications asynchronously using a coroutine.

This method does not block Unity's main thread.

On Android, this list only includes notifications sent through Airship.

Parameters
onCompleteCallback invoked with the list of active notifications when the operation completes.
onErrorOptional callback invoked if an error occurs.
Returns
A coroutine that can be started with StartCoroutine.

References AirshipSDK.List.

◆ GetNotificationStatus()

IEnumerator AirshipSDK.AirshipPush.GetNotificationStatus ( Action< PushNotificationStatus >  onComplete,
Action< Exception >  onError = null 
)
inline

Gets the notification status asynchronously using a coroutine.

This method does not block Unity's main thread.

Parameters
onCompleteCallback invoked with the notification status when the operation completes.
onErrorOptional callback invoked if an error occurs.
Returns
A coroutine that can be started with StartCoroutine.

References AirshipSDK.List, and AirshipSDK.PushNotificationStatus.

◆ GetPushToken()

string? AirshipSDK.AirshipPush.GetPushToken ( )
inline

Gets the registration token if generated.

Returns
The push token.

◆ IsUserNotificationEnabled()

bool AirshipSDK.AirshipPush.IsUserNotificationEnabled ( )
inline

Checks if user notifications are enabled or not on Airship.

Returns
true if user notifications are enabled, otherwise false.

◆ SetUserNotificationsEnabled()

void AirshipSDK.AirshipPush.SetUserNotificationsEnabled ( bool  enabled)
inline

Enables/disables notifications on Airship.

When enabled, it will cause the user to be prompted for the permission on platforms that support it. To get the result of the prompt, use enableUserNotifications.

Parameters
enabledtrue to enable, false to disable.

References AirshipSDK.List.

Member Data Documentation

◆ android

readonly IAirshipPushAndroid AirshipSDK.AirshipPush.android

Android only push methods.

◆ iOS

readonly IAirshipPushIOS AirshipSDK.AirshipPush.iOS

iOS only push methods.


Generated on Wed Sep 2 2026 21:27:03 for Airship Unity Plugin by   doxygen 1.9.8