We constantly publish updates to our documentation, which may not yet be available in your language. For the most current information, use the English version.
You can register a delegate callback to notify you of the status of event and session tracking. You can add as many listeners as you need after creating the config object:
Java
Javascript
AdjustConfig config = new AdjustConfig(this, appToken, environment);
// Set event success tracking delegate.
config.setOnEventTrackingSucceededListener(new OnEventTrackingSucceededListener() {
@Override
public void onFinishedEventTrackingSucceeded(AdjustEventSuccess eventSuccessResponseData) {
// ...
}
});
// Set event failure tracking delegate.
config.setOnEventTrackingFailedListener(new OnEventTrackingFailedListener() {
@Override
public void onFinishedEventTrackingFailed(AdjustEventFailure eventFailureResponseData) {
// ...
}
});
// Set session success tracking delegate.
config.setOnSessionTrackingSucceededListener(new OnSessionTrackingSucceededListener() {
@Override
public void onFinishedSessionTrackingSucceeded(AdjustSessionSuccess sessionSuccessResponseData) {
// ...
}
});
// Set session failure tracking delegate.
config.setOnSessionTrackingFailedListener(new OnSessionTrackingFailedListener() {
@Override
public void onFinishedSessionTrackingFailed(AdjustSessionFailure sessionFailureResponseData) {
// ...
}
});
Adjust.onCreate(config);
The SDK will call the delegate functions after it tries to send a package to the Adjust backend. You have access to a response data object within the delegate callback. This object contains information about the status of the callback. Here is a summary of the session response data properties:
Event properties
Property
Data type
Description
message
String
The message from the server or the error logged by the SDK.
timeStampe
DateTime
The timestamp from the Adjust backend.
adid
String
A unique device identifier provided by Adjust.
jsonResponse
Object
The JSON object with the response from the server.
eventToken
String
The event token.
callbackId
String
The custom defined callback ID set on event object.
willRetry
Boolean
Returned if the event object failed. Indicates whether there will be an attempt to resend the package at a later time.
Session properties
Property
Data type
Description
message
String
The message from the server or the error logged by the SDK.
timeStamp
DateTime
The timestamp from the Adjust backend.
adid
String
A unique device identifier provided by Adjust.
jsonResponse
Object
The JSON object with the response from the server.
willRetry
Boolean
Returned if the session object failed. Indicates whether there will be an attempt to resend the package at a later time.
Note:
If any value is unavailable, it will default to nil.