-
Notifications
You must be signed in to change notification settings - Fork 0
Android SDK Start Survey Programmatically
Samuel Berthe edited this page Sep 19, 2022
·
3 revisions
In most cases, you should let the Screeb targeting engine start the survey. But sometimes, you may want to run a survey on user action.
Screeb.startSurvey(
surveyId = "<SURVEY_ID>",
allowMultipleResponses = true
)
If current user already replied to your survey and you would rather not display it many times, please add the allowMultipleResponses
argument:
Screeb.startSurvey(
surveyId = "<SURVEY_ID>",
allowMultipleResponses = false
)
The startSurvey
command accepts a list of hidden fields. Values passed as parameters will be listed alongside the responses, on the Screeb platform.
Screeb.startSurvey(
surveyId = "<SURVEY_ID>",
allowMultipleResponses = true,
hiddenFields = HiddenFields().apply {
this["h1"] = "hidden_field1"
this["h_count"] = 75
}
)