Push Callbacks
Netmera provides the following push callbacks:
Push Register
Push Receive
Push Open
Push Dismiss
Push Button Click
Step 1: Implement a Receiver Class
Create a class that extends NetmeraPushBroadcastReceiver
and override any callback's method. For instance,
Pay attention to the use of Toast messages in the production environment.
InAppActionCalllback
In-App Callback:
To activate an in-app callback, you should choose the 'banner' style within the Netmera control panel. It's important to note that selecting the 'pop-up' style will not trigger the callback.
PushActionCalllback
Widget Callback Methods
If you want to handle widget-related actions, implement the NMWebWidgetCallbacks
interface and override the onDeeplinkTriggered()
and onOpenUrlTriggered()
methods.
Select Widget Style on Netmera Panel:
To trigger a Widget callback, you must select the "Widget" style when creating the widget in Netmera panel.
Choosing Manage App:
If you want the action to be handled within the application; when assigning an action to an element, choose 'Manage App' on "Create New Widget" on Netmera Panel. Without this selection, the SDK will handle it, but it won't trigger the callback.
Step 2: Let Netmera Know You Use Custom Receiver
To ensure consistency in Netmera's business logic and data collection, add the following line in the defaultConfig
block of your Gradle file,
Last updated