Message Center

Airship Message Center is a place in your app where you can display persistent rich messages, including HTML, video, etc. The messages are hosted by Airship, and are typically displayed in standard inbox-style within your app.

The default message center can be displayed at any time
UrbanAirship.displayMessageCenter()
The message center can be dismissed
UrbanAirship.dismissMessageCenter()
To display the inbox message
//Includes a boolean to determine if the message should be displayed in an overlay
UrbanAirship.displayMessage("message-id", true)
To dismiss an inbox message
//Includes a boolean to determine if the message should be dismissed from an overlay
UrbanAirship.dismissMessage(true)
To delete an inbox message
UrbanAirship.deleteInboxMessage("message-id").then((result) => {
  console.log('Message deleted: ', result)
}).catch((err) => {
  console.log('Unable to delete message: ', err)
})
To mark an inbox message read
UrbanAirship.markInboxMessageRead("message-id").then((result) => {
  console.log('Message marked as read: ', result)
}).catch((err) => {
  console.log('Unable to mark message as read: ', err)
})
To refresh the inbox
UrbanAirship.refreshInbox().then((result) => {
  console.log('Inbox refreshed: ', result)
}).catch((err) => {
  console.log('Unable to refresh inbox: ', err)
})
To set the default behavior when the message center is launched from a push
UrbanAirship.setAutoLaunchDefaultMessageCenter(false)