Skip to main content

🚩 Callbacks

Use our GleapDelegate to get notified on certain state changes of the Gleap widget. This enables you to create an even deeper integration with Gleap.

Gleap.getInstance().setWidgetOpenedCallback(new WidgetOpenedCallback() {
@Override
public void invoke() {
// called when the widget is opened
}
});


Gleap.getInstance().setWidgetClosedCallback(new WidgetClosedCallback() {
@Override
public void invoke() {
// called when the widget is closed
}
});

Gleap.getInstance().setConfigLoadedCallback(new ConfigLoadedCallback() {
@Override
public void configLoaded(JSONObject jsonObject) {
// called when the config is loaded from the server successfully
}
});

Gleap.getInstance().setFeedbackSentCallback(new FeedbackSentCallback() {
@Override
public void invoke(String message) {
// called when the feedback is sent successfully
}
});

Gleap.getInstance().setFeedbackSendingFailedCallback(new FeedbackSendingFailedCallback() {
@Override
public void invoke(String message) {
// called when the sending of the feedback failed
}
});

Gleap.getInstance().registerCustomAction(new CustomActionCallback() {
@Override
public void invoke(String message) {
// called when a custom action from the widget is issued
}
});

Gleap.getInstance().setFeedbackFlowStartedCallback(new FeedbackFlowStartedCallback() {
@Override
public void invoke(String message) {
// called when the feedback flow ist started, not only the widget is opened
}
});

Gleap.getInstance().InitializationDoneCallback(new InitializationDoneCallback() {
@Override
public void invoke() {
// called when the sdk is initialize
});