Welcome to Instabug's Documentation!
Here you'll find a comprehensive technical guide
to help you start working with the Instabug SDK efficiently.

Get Started

Callbacks

Covered here is how to set up the callback that fires before and after every survey is shown.

🚧

Avoiding Memory Leaks

These APIs hold the callbacks in a strong reference, so we strongly suggest to avoid registering callbacks without unregistering them when needed, as it may cause a memory leak.

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(new Runnable() {
    @Override
    public void run() {
        //Pause game
    }
});
Surveys.setOnShowCallback(OnShowCallback {
                //Pause game
            }            
        )

After the Survey Has Been Dismissed

Surveys.setOnDismissCallback(new OnDismissCallback() {
            @Override
            public void onDismiss() {
                
            }
        });
Surveys.setOnDismissCallback { }

Updated 10 months ago


What's Next

Do more with callbacks, like adding user attributes and events as well as additional logs.

Setting Custom Data
Report Logs

Callbacks


Covered here is how to set up the callback that fires before and after every survey is shown.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.