Display Interactive Notifications
Use interactive notifications to add buttons to push notifications from your mobile app. Marketing Cloud sends the category name for these interactive notifications in the message payload.
- To set up interactive notifications for your app, use the Implementation sample code as a guide and modify for your situation.
The sample code applies to the
didFinishLaunchingWithOptionsapplication delegate mention. The sample code shows how to create a category named “Example”. When you send this category with the payload from Marketing Cloud, the notification displays in the notification center with buttons.
- To check if your action triggered and to take action, examine the push notification’s payload in your push handler. Use the Handle Action sample code as a guide.
- After setup, ask the marketer to enable interactive notifications on the MobilePush Administration page in Marketing Cloud.
Example: Handle Action
In your push handler, examine the push notification’s payload to see if your action triggered and if your application performed the action.