The custom tags and callback code can be used to create your preferred user segment and callbacks apart from the existing ones present on the Truepush App dashboard.

After the code integration is complete using the guide here. Follow the below steps to add customer tags and callbacks-

STEP 1

Implement a class with TruePushCallBacks interface and Override the following methods to receive callbacks about Tags registration,

1.1 onSuccess(String successResponse)

1.2 onFailure(String errorResponse)

1.3 onNotificationRecived(String response, String fireEvent)


onSuccess(String successResponse)
onSuccess(String successResponse)
onSuccess(String successResponse)
onNotificationRecived(String response, String fireEvent)
onNotificationRecived(String response, String fireEvent)
onNotificationRecived(String response, String fireEvent)
onFailure(String errorResponse)
onFailure(String errorResponse)
onFailure(String errorResponse)

STEP 2

2.1 Prepare the tags you want to add using the JSON code given in the code integration page of the dashboard:


2.2 You can add any number of tags in the form of Object and place them in an Array in the JSON code.


STEP 3

Finally, you will have to add the tags using the code addTags()” to add this information to the custom tag that will create a custom segment in the Truepush dashboard.

addTags() code

Hence, your custom segments and callbacks are added on your Truepush dashboard.