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

Airship Message Center. More...

Public Member Functions

IEnumerator GetUnReadCount (Action< int > onComplete, Action< Exception > onError=null)
 Gets the number of unread messages for the message center asynchronously using a coroutine.
 
IEnumerator GetMessages (Action< IEnumerable< InboxMessage > > onComplete, Action< Exception > onError=null)
 Gets the inbox messages asynchronously using a coroutine.
 
void MarkMessageRead (string messageId)
 Mark an inbox message as having been read.
 
void DeleteMessage (string messageId)
 Delete an inbox message.
 
IEnumerator RefreshInbox (Action onComplete=null, Action< Exception > onError=null)
 Refreshes the inbox asynchronously using a coroutine.
 
void SetAutoLaunchDefaultMessageCenter (bool enabled)
 Sets the default behavior when the message center is launched from a push notification.
 
void Display (string? messageId)
 Requests to display the Message Center.
 
void Dismiss ()
 Dismisses the OOTB message center if displayed.
 
void ShowMessageView (string messageId)
 Overlays the message view.
 
void ShowMessageCenter (string? messageId)
 Overlays the message center regardless if auto launch Message Center is enabled or not.
 

Detailed Description

Airship Message Center.

Member Function Documentation

◆ DeleteMessage()

void AirshipSDK.AirshipMessageCenter.DeleteMessage ( string  messageId)
inline

Delete an inbox message.

Parameters
messageIdThe messageId for the message.

References AirshipSDK.List.

◆ Dismiss()

void AirshipSDK.AirshipMessageCenter.Dismiss ( )
inline

Dismisses the OOTB message center if displayed.

◆ Display()

void AirshipSDK.AirshipMessageCenter.Display ( string?  messageId)
inline

Requests to display the Message Center.

Will either emit an event to display the Message Center if auto launch message center is disabled, or display the OOTB message center.

Parameters
messageIdOptional message Id.

References AirshipSDK.List.

◆ GetMessages()

IEnumerator AirshipSDK.AirshipMessageCenter.GetMessages ( Action< IEnumerable< InboxMessage > >  onComplete,
Action< Exception >  onError = null 
)
inline

Gets the inbox messages asynchronously using a coroutine.

This method does not block Unity's main thread.

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

References AirshipSDK.List.

◆ GetUnReadCount()

IEnumerator AirshipSDK.AirshipMessageCenter.GetUnReadCount ( Action< int >  onComplete,
Action< Exception >  onError = null 
)
inline

Gets the number of unread messages for the message center asynchronously using a coroutine.

This method does not block Unity's main thread.

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

References AirshipSDK.List.

◆ MarkMessageRead()

void AirshipSDK.AirshipMessageCenter.MarkMessageRead ( string  messageId)
inline

Mark an inbox message as having been read.

Parameters
messageIdThe messageId for the message.

References AirshipSDK.List.

◆ RefreshInbox()

IEnumerator AirshipSDK.AirshipMessageCenter.RefreshInbox ( Action  onComplete = null,
Action< Exception >  onError = null 
)
inline

Refreshes the inbox asynchronously using a coroutine.

This method does not block Unity's main thread.

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

References AirshipSDK.List.

◆ SetAutoLaunchDefaultMessageCenter()

void AirshipSDK.AirshipMessageCenter.SetAutoLaunchDefaultMessageCenter ( bool  enabled)
inline

Sets the default behavior when the message center is launched from a push notification.

Parameters
enabledtrue to automatically launch the default message center. If false the message center must be manually launched by the app.

References AirshipSDK.List.

◆ ShowMessageCenter()

void AirshipSDK.AirshipMessageCenter.ShowMessageCenter ( string?  messageId)
inline

Overlays the message center regardless if auto launch Message Center is enabled or not.

Parameters
messageIdOptional message Id.

References AirshipSDK.List.

◆ ShowMessageView()

void AirshipSDK.AirshipMessageCenter.ShowMessageView ( string  messageId)
inline

Overlays the message view.

Should be used to display the actual message body in a custom Message Center.

Parameters
messageIdThe message Id.

References AirshipSDK.List.


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