Customizing notifications
Batch allows you to customize your notifications adding specific keys to the payload or by setting some configuration in native code.
Advanced notification configuration is highly OS-specific and requires implementation at a lower level than React-Native. Therefore, you might find what you want in the native documentations for each OS:
Small push notification icon
In order to make sure that users understand that your notifications come from your app, you need to setup a Small Icon and Notification Color. An icon can be generated using Android Studio's asset generator: as it will be tinted and masked by the system, only the alpha channel matters and will define the shape displayed. It should be of 24x24dp size. If your notifications shows up in the system statusbar in a white shape, this is what you need to configure.
This can be configured in the manifest as metadata in the application tag:
Disabling foreground notifications
By default, the Batch React-Native plugin will always show foreground notifications on both platforms.
The SDK exposes a method on BatchPush
to change this behaviour on iOS only:
Adding notification actions
Notification actions are supported but they integration differ greatly between iOS and Android. Please see the native documentations for more info:
Overriding the notification channel on Android
It is possible to override the default notification channel on Android either globally on a per notification basis.
As this is an operation that needs to be done by native code in the background when React-Native isn't running, please follow our native channels documentation.
Last updated
Was this helpful?