When the push module is started in our SDK, default events will be reported without you having to do anything. Our platform will trigger events such as : notification or webview.
This page indicates how to start the push component and how to customize the push events if you wish.
For a broader solution overview, click here
- Successful SDK initialization and synchronization with
[INSPush class]
module added (see SDK Initialization). - Auto-start or manually start (see SDK Start)
The SDK provides you the possibility to custom the push event behavior. Your custom events will be treated like every other SDK events.
First, you have to implement your activity with ActionLauncher.Callbacks
...
public class MainActivity extends Activity implements ActionLauncher.Callbacks {
}
...
Then, provide the Action Callback to PushManager
...
Insiteo.getManager().getPushManager().setActionCallbacks(this);
...
Once finished, just implement the callbacks methods like this in your activity:
...
@Override
public void onActionNotification() {
//Do what you want
}
@Override
public void onActionCustom(String s) {
//Do what you want
}
@Override
public void onActionWebview(String s) {
//Do what you want
}
...