Push
class Push
Batch Push module
Functions
Link copied to clipboard
Append Batch data to your open intent so that opens from this push will be tracked by Batch and displayed into your dashboard.
Link copied to clipboard
Dismiss all notifications shown by the application.
Link copied to clipboard
open fun displayNotification(@NonNull context: Context, @NonNull intent: Intent, @Nullable interceptor: BatchNotificationInterceptor)
open fun displayNotification(@NonNull context: Context, @NonNull intent: Intent, @Nullable interceptor: BatchNotificationInterceptor, bypassManualMode: Boolean)
Call this method to display the notification for this intent.
open fun displayNotification(@NonNull context: Context, @NonNull remoteMessage: RemoteMessage, @Nullable interceptor: BatchNotificationInterceptor)
Call this method to display the notification for this message.
Link copied to clipboard
Get the channels manager, allowing you to tweak how notifications will behave regarding the channels feature introduced in Android 8.
Link copied to clipboard
Get the current push registration.
Link copied to clipboard
Check if the received push is a Batch one.
Link copied to clipboard
Get manual display mode for push notifications.
Link copied to clipboard
open fun makePendingIntent(@NonNull context: Context, @NonNull intent: Intent, @NonNull pushIntentExtras: Bundle): PendingIntent
open fun makePendingIntent(@NonNull context: Context, @NonNull intent: Intent, @NonNull remoteMessage: RemoteMessage): PendingIntent
Make a PendingIntent suitable for notifications from a given Intent.
Link copied to clipboard
open fun makePendingIntentForDeeplink(@NonNull context: Context, @NonNull deeplink: String, @NonNull pushIntentExtras: Bundle): PendingIntent
open fun makePendingIntentForDeeplink(@NonNull context: Context, @NonNull deeplink: String, @NonNull remoteMessage: RemoteMessage): PendingIntent
Make a PendingIntent suitable for notifications from a given deeplink.
Link copied to clipboard
Call this method when you just displayed a Batch push notification by yourself.
Link copied to clipboard
Force Batch to renew the push token.
Link copied to clipboard
open fun requestNotificationPermission(@NonNull context: Context, @Nullable listener: BatchPermissionListener)
Request the notification runtime permission.
Link copied to clipboard
Sets additional intent flags for notifications.
Link copied to clipboard
Set a custom large icon that push notifications will use.
Link copied to clipboard
Set manual display mode for push notifications.
Link copied to clipboard
Set a notification interceptor.
Link copied to clipboard
Set the notification accent color for Lollipop or later.
Link copied to clipboard
Adjust the way Batch will display notifications.
Link copied to clipboard
Set a custom small icon resource that push notifications will use.
Link copied to clipboard
Should the developer handle and display this push, or will Batch display it?
Link copied to clipboard
Whether Batch should show notifications or not.