Message Center for the .NET Package
The default Message Center is available for .NET MAUI with minimal integration required. Basic theming options are supported.
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:
Airship.Instance.DisplayMessageCenter();Override Default Display Behavior
To use a custom Message Center implementation instead of the default UI, set an event handler:
Airship.Instance.OnMessageCenterDisplay += OnMessageCenterDisplay;
static void OnMessageCenterDisplay(object sender, MessageCenterEventArgs e)
{
// Navigate to your custom Message Center UI
// e.MessageId is optional - null means show the full message list
}Fetch Messages
Retrieve messages from the inbox:
var messages = Airship.Instance.InboxMessages;Listen for Message Updates
Subscribe to message updates using events:
Airship.Instance.InboxMessages(messages =>
{
// Handle messages
});Listen for Unread Count Changes
Subscribe to unread count updates:
var unreadCount = Airship.Instance.UnreadCount;
// Update badge or UIRefresh Messages
Manually refresh the message list from the server:
Airship.Instance.FetchInboxMessages(success =>
{
// Handle result
});Mark Messages as Read
Mark one or more messages as read:
Airship.Instance.MarkMessageRead("message-id");Delete Messages
Delete one or more messages:
Airship.Instance.DeleteMessage("message-id");Categories