For the complete documentation index, see llms.txt. This page is also available as Markdown.

Survey Callbacks for Android

Run your own code before a survey appears and after it is dismissed in your Android app, for example to pause a game. Includes a memory leak warning.

Avoiding Memory Leaks

You can execute code in a callback that gets called before a survey is shown and after it has been dismissed. You can use this for things like pausing and resuming a game, for example.

Before Showing the Survey

Surveys.setOnShowCallback(OnShowCallback {
                //Pause game
})
Surveys.setOnShowCallback(new OnShowCallback() {
    @Override
    public void onShow() {
                
    }
});

After the Survey Has Been Dismissed

Surveys.setOnFinishCallback(OnFinishCallback {

})
Surveys.setOnFinishCallback(new OnFinishCallback() {
            @Override
            public void onFinish(String surveyId, String state, JSONObject response) {
            }
        });

Last updated