Message Center

The default Message Center is available for Unity with minimal integration required. Basic theming options are supported.

View as Markdown

Message Center provides an inbox for rich, HTML-based messages that users can view at their convenience. By default, when your app receives a push notification with a Message Center action, the Message Center automatically displays.

You can also display the Message Center manually by calling a simple method, making it easy to add a Message Center button to your app’s navigation.

Message Center inboxes are associated with channel IDs. Each device has a unique channel ID that persists across app launches, allowing users to access their message history.

Display the Message Center

Display the Message Center with a single method call:

UAirship.Shared.DisplayMessageCenter();

Override Default Display Behavior

Custom display behavior is not supported in Unity. The default Message Center will be displayed when requested.

Fetch Messages

Retrieve messages from the inbox:

UAirship.Shared.InboxMessages();

Listen for Message Updates

Subscribe to message updates using callbacks:

UAirship.Shared.InboxMessages(messages =>
{
    // Handle messages
});

Listen for Unread Count Changes

Subscribe to unread count updates:

var unreadCount = UAirship.Shared.UnreadCount;
// Update badge or UI

Refresh Messages

Manually refresh the message list from the server:

UAirship.Shared.RefreshInbox();

Mark Messages as Read

Mark one or more messages as read:

UAirship.Shared.MarkInboxMessageRead("message-id");

Delete Messages

Delete one or more messages:

UAirship.Shared.DeleteInboxMessage("message-id");