Airship Push. More...
Collaboration diagram for AirshipSDK.AirshipPush: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()
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
-
identifier The identifier.
References AirshipSDK.List.
◆ ClearNotifications()
|
inline |
Clears all notifications for the app.
◆ EnableUserNotifications()
|
inline |
Enables user notifications asynchronously using a coroutine.
This method does not block Unity's main thread.
- Parameters
-
fallback Optional fallback. onComplete Callback invoked with the permission result when the operation completes. onError Optional callback invoked if an error occurs.
- Returns
- A coroutine that can be started with StartCoroutine.
References AirshipSDK.List.
◆ GetActiveNotifications()
|
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
-
onComplete Callback invoked with the list of active notifications when the operation completes. onError Optional callback invoked if an error occurs.
- Returns
- A coroutine that can be started with StartCoroutine.
References AirshipSDK.List.
◆ GetNotificationStatus()
|
inline |
Gets the notification status asynchronously using a coroutine.
This method does not block Unity's main thread.
- Parameters
-
onComplete Callback invoked with the notification status when the operation completes. onError Optional callback invoked if an error occurs.
- Returns
- A coroutine that can be started with StartCoroutine.
References AirshipSDK.List, and AirshipSDK.PushNotificationStatus.
◆ GetPushToken()
|
inline |
Gets the registration token if generated.
- Returns
- The push token.
◆ IsUserNotificationEnabled()
|
inline |
Checks if user notifications are enabled or not on Airship.
- Returns
- true if user notifications are enabled, otherwise false.
◆ SetUserNotificationsEnabled()
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
-
enabled true 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.
1.9.8