Advanced customization and click trackers

Info
Create a completely custom notification, where your receive only data (JSON format) from Ocamba.

In this case, you need to take care of notification layout, intents, clicks, click tracker (in case you want them), etc.

  1. To use custom notification clicks add following to Application class:

    OcambaHoood.notification().customTrack();
    
  2. On ocambaNotificationReceived callback you will receive list of received notification object:

    @Override
    public void ocambaNotificationReceived(OcambaNotificationObject message, Context context)) {
    Log.i(TAG, "Ocamba Received Notification: " + message.getObject());
    //from this object you can get impTracker, clickTracker, title, image, description, etc..
    }
    
  3. For custom click use:

    OcambaRequest.getTracker(message.getImpTracker(), new OcambaResponseCallback() {
        @Override
        public void onFailure(Exception e) {
        Log.e(TAG, "TRACKER onFailure(): " + e); e.printStackTrace();
        }
    
        @Override
        public void onResponse(int code, String response) {
        Log.i(TAG, "TRACKER response code: " + code + ", response: " + response); 
        }
    });
    
On This Page