Order the steps
Order the steps to post an order-update notification.
- Create the 'Order updates' channel once
- Build the notification with an immutable content PendingIntent
- Post with NotificationManagerCompat.notify
- Ask for POST_NOTIFICATIONS when the user opts into updates
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A D B C
- Create the 'Order updates' channel once Channels must exist before posting on Android 8+.
- Ask for POST_NOTIFICATIONS when the user opts into updates Required on Android 13+.
- Build the notification with an immutable content PendingIntent The tap opens the order.
- Post with NotificationManagerCompat.notify Shows it if permission and channel allow.