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:

    ```java
        OcambaHoood.getBuilder().getNotificationBuilder().customTrack();
    ```

  1. On ocambaNotificationReceived callback you will receive list of received notification object:

    ```java
        @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..
        }
    ```

  1. For custom click use:

    ```java
        OcambaRequest.getInstance().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