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

Event Handlers

Covered here is how to set up the event handler that fire before and after every survey is shown.

You execute code in a handler that gets called before a survey is shown, and after it has been dismissed. Use those for things like pausing and resuming a game, for example.

Before Showing the Survey

//iOS
IBGSurveys.WillShowSurveyHandler = () =>
{
  System.Console.WriteLine("New Survey");
};

//Android
Surveys.SetOnShowCallback(new IPreShowingSurveyRunnable());
public class IPreShowingSurveyRunnable : Java.Lang.Object, IOnShowCallback
{
  public void OnShow()
  {
    Android.Util.Log.Warn("PreShowingSurvey", "Pre Showing survey");
  }
}

After the Survey Has Been Dismissed

//iOS
IBGSurveys.DidDismissSurveyHandler = () =>
{
    System.Console.WriteLine("Did Dismiss Survey");
};

//Android
Surveys.SetOnDismissCallback(new IOnDismissSurveyCallback());

public class IOnDismissSurveyCallback : Java.Lang.Object, IOnDismissCallback
{
  public void OnDismiss()
  {
    Android.Util.Log.Warn("PreShowingSurvey", "Pre Showing survey");
  }
}

Updated 12 months ago


What's Next

Use the event handlers even better by adding user attributes and events in them as well as adding additional logs.

Setting Custom Data
Report Logs

Event Handlers


Covered here is how to set up the event handler that fire 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.