This handler can be used to run a block of code right before a survey is shown to the user.
IBGSurveys.willShowSurveyHandler = {
// Change some state
}
IBGSurveys.willShowSurveyHandler = ^{
// Change some state
};
Surveys.setOnShowCallback(new Runnable() {
@Override
public void run() {
//Pause game
}
});
Surveys.onShowCallback(() => {
//Perform any changes before the survey appears.
});
cordova.plugins.surveys.setOnShowHandler(() => {console.log('On show survey')}, (error) => {})
//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");
}
}
Surveys.setOnShowCallback(Function function);