PushMessageListener
This class is a callback for the push message delivery. In order to modify the behavior simply extend this class and override methods
Since
5.3
Author
Umang Chamaria
Constructors
Functions
Callback to customise the notification object if required. SDK uses this method to add/customise a few settings like vibration, led color etc. Make sure you call super before adding your own customisation.
Forcefully dismisses a Notification posted to the status bar. This is required when action buttons are clicked since autoCancel does not work with action button
Get the intent flags for the redirection intent
Returns the redirectIntent which will be started from the pending intent of the notification Note: Overriding this method and returning a custom intent will affect click tracking.
Callback triggered for custom action.
Return value of this method decides whether a notification should be shown or not. In case you are overriding this method ensure you call super(context, payload)
, notifications will not be shown if super is not called. Note: If the super(context, payload)
returns false
ensure that the method always returns false.
Logs impression for the notification if it was shown
Tracks notification clicks on MoEngage Platform.
Build the notification using NotificationCompat.Builder
This method is used to redirect the user to a specific screen or URL on notification click.
Callback which is triggered when a push payload is received. This method is responsible for creating the notification object and posting the notification.
To get a callback for push not sent via MoEngage Platform.
Callback triggered when notification is cleared from the device's notification drawer.
Callback triggered whenever notification is not shown by the SDK.
Callback triggered whenever notification is received by the application.