Are push notifications from Repro displayed as banners by default when received?¶
The display of push notifications delivered from Repro varies depending on the OS.
Behavior after SDK implementation¶
iOS:
When a push notification is received, it is displayed as a banner and also registered in the notification center. If the app is in the foreground, it is not displayed by default.
Android:
When a push notification is received, it is only displayed in the notification drawer. There is no behavior for displaying it as a banner at the top of the screen. Push notifications that appear as banners are called heads-up notifications.
Differences in notification display by OS¶
iOS:
Even if user notification settings allow notifications, it is possible to disable only banner display. Even when push notifications are correctly implemented, they may not appear at the top of the screen.
By default, notifications are not displayed in the foreground, but this can be implemented. Using userNotificationCenter(_:willPresent:withCompletionHandler:), the behavior differs when forcing banner display.
Android:
Notifications are only displayed in the notification drawer and do not appear at the top of the screen. Therefore, even if push notifications delivered from Repro to Android devices do not appear at the top, they are correctly implemented as long as they appear in the notification drawer.
If you want to display heads-up notifications as banners, additional implementation is required on the app side, including setting up notification channels.
How to display heads-up notifications on Android¶
1.Deliver using custom (JSON) format¶
When delivering from Repro, please use the Message(Custom(JSON)) format.
Note
Heads-up notifications cannot be implemented using the Message(Standard) format.
2.Create a new notification channel¶
To implement heads-up notifications, you need to prepare a notification channel separate from the one used by the Repro SDK for standard format notifications.
When push notifications are delivered in standard format, the Repro SDK automatically handles them. In this case, the SDK assigns received notifications to the notification channel specified in AndroidManifest and sets the importance level to IMPORTANCE_DEFAULT by default.
Reference: Setup Notification Channels
Prepare a notification channel separate from the one used for standard format push notifications, and set the channel importance to IMPORTANCE_HIGH.
By handling notifications delivered from Repro and assigning them to this channel, you can display them as heads-up notifications.
If you have any questions or encounter issues during implementation, please contact us via the chat support at the bottom-right of the screen.