public class SurveyMonkey
extends java.lang.Object
| Constructor and Description |
|---|
SurveyMonkey() |
| Modifier and Type | Method and Description |
|---|---|
static com.surveymonkey.surveymonkeyandroidsdk.SMFeedbackFragment |
newSMFeedbackFragmentInstance(java.lang.String collectorHash,
org.json.JSONObject... customVariables)
Use the newSMFeedbackFragmentInstance method to create an SMFeedbackFragment which can be embedded in activity and used to present a survey to the user
|
void |
onStart(android.app.Activity activity,
int requestCode,
java.lang.String collectorHash,
java.lang.String alertTitleText,
java.lang.String alertBodyText,
long afterInstallInterval,
long afterDeclineInterval,
long afterAcceptInterval,
org.json.JSONObject... customVariables)
Use the onStart method to present a customized AlertDialog prompt (at various intervals that you define) to the user encouraging them to take your in-app feedback survey.
|
void |
onStart(android.app.Activity activity,
java.lang.String appName,
int requestCode,
java.lang.String collectorHash,
org.json.JSONObject... customVariables)
Use the onStart method to present an AlertDialog prompt to the user encouraging them to take your in-app feedback survey.
|
void |
startSMFeedbackActivityForResult(android.app.Activity context,
int requestCode,
java.lang.String collectorHash,
org.json.JSONObject... customVariables)
Use the startSMFeedbackActivityForResult method to present a survey to the user.
|
public static com.surveymonkey.surveymonkeyandroidsdk.SMFeedbackFragment newSMFeedbackFragmentInstance(java.lang.String collectorHash,
org.json.JSONObject... customVariables)
collectorHash - The collector hash that points to your Mobile SDK Collector - found on the Collector Details page of your chosen collector on SurveyMonkey.com
Once the user completes your survey, a JSONObject containing the user's response will be returned to the spawning activity in onActivityResult
Note: If there are problems collecting the user's response, the SDK will return an SMError object with one of the domains and error codes listed in the SMError documentation
customVariables - (Optional) PLATINUM USERS ONLY: If you've set up custom variables in Create, you can pass a JSON object with the format {"key":"value",...} here.SMErrorpublic void onStart(android.app.Activity activity,
int requestCode,
java.lang.String collectorHash,
java.lang.String alertTitleText,
java.lang.String alertBodyText,
long afterInstallInterval,
long afterDeclineInterval,
long afterAcceptInterval,
org.json.JSONObject... customVariables)
activity - The activity that will spawn the SMFeedbackActivity - Note: The spawning activity must implement onActivityResult to capture the respondent JSONObject or SMError object returned by SurveyMonkeyrequestCode - If greater than or equal to 0, this code will be returned in onActivityResult() when the activity exits.collectorHash - The collector hash that points to your Mobile SDK Collector - found on the Collector Details page of your chosen collector on SurveyMonkey.com
Once the user completes your survey, a JSONObject containing the user's response will be returned to the spawning activity in onActivityResult
Note: If there are problems collecting the user's response, the SDK will return an SMError object with one of the domains and error codes listed in the SMError documentation
alertTitleText - The title of the survey prompt dialog displayed to the useralertBodyText - The body of the survey prompt dialog displayed to the userafterInstallInterval - The amount of time (in milliseconds) to wait to first prompt the user to take your survey after they install your appafterDeclineInterval - The amount of time (in milliseconds) to wait to prompt the user to take your survey after they decline to take itafterAcceptInterval - The amount of time (in milliseconds) to wait to prompt the user to take your survey after they consent to take itcustomVariables - (Optional) PLATINUM USERS ONLY: If you've set up custom variables in Create, you can pass a JSON object with the format {"key":"value",...} here.SMErrorpublic void onStart(android.app.Activity activity,
java.lang.String appName,
int requestCode,
java.lang.String collectorHash,
org.json.JSONObject... customVariables)
activity - The activity that will spawn the SMFeedbackActivity - Note: The spawning activity must implement onActivityResult to capture the respondent JSONObject or SMError object returned by SurveyMonkeyappName - The name of your app - used in the survey prompt dialog e.g. "Enjoying the SurveyMonkey app?"requestCode - If greater than or equal to 0, this code will be returned in onActivityResult() when the activity exits.collectorHash - The collector hash that points to your Mobile SDK Collector - found on the Collector Details page of your chosen collector on SurveyMonkey.com
Once the user completes your survey, a JSONObject containing the user's response will be returned to the spawning activity in onActivityResult
Note: If there are problems collecting the user's response, the SDK will return an SMError object with one of the domains and error codes listed in the SMError documentation
SMErrorpublic void startSMFeedbackActivityForResult(android.app.Activity context,
int requestCode,
java.lang.String collectorHash,
org.json.JSONObject... customVariables)
context - The activity that will spawn the SMFeedbackActivity - Note: The spawning activity must implement onActivityResult to capture the respondent JSONObject or SMError object returned by SurveyMonkeyrequestCode - If greater than or equal to 0, this code will be returned in onActivityResult() when the activity exits.collectorHash - The collector hash that points to your Mobile SDK Collector - found on the Collector Details page of your chosen collector on SurveyMonkey.com
Once the user completes your survey, a JSONObject containing the user's response will be returned to the spawning activity in onActivityResult
Note: If there are problems collecting the user's response, the SDK will return an SMError object with one of the domains and error codes listed in the SMError documentation
customVariables - (Optional) PLATINUM USERS ONLY: If you've set up custom variables in Create, you can pass a JSON object with the format {"key":"value",...} here.SMError