Custom Variables in the Mobile Intercept SDK allow developers to pass additional contextual or user-specific information to the intercept.
They are defined as a HashMap<Integer, String> and attached during SDK initialization via the TouchPoint builder.
Follow the steps below to implement custom variables in your Android application:
HashMap<Integer, String> cutVars = new HashMap<>(); cutVars.put(2, "Custom value 2"); cutVars.put(3, "Custom value 3"); TouchPoint touchPoint = new TouchPoint.Builder(DataCenter.US) .customVariables(cutVars) .build(); QuestionProCX.getInstance().init(this, touchPoint, new IQuestionProInitCallback() { @Override public void onInitializationSuccess(String message) { Log.d("SDK Init", "onInitializationSuccess: " + message); } @Override public void onInitializationFailure(String error) { Log.d("SDK Init", "onInitializationFailure: " + error); } });
The Mobile Intercept SDK supports language-specific intercepts that automatically localize the survey experience based on the mobile device’s language settings.
If a translation for the detected language is available in the survey, it will be used. Otherwise, the intercept defaults to English.
This ensures that users receive surveys in their preferred language, enhancing engagement and response quality.
Example: If a user's phone is set to Spanish and the survey has a Spanish translation, the intercept will be presented in Spanish.
Once enabled, the SDK will automatically handle language selection at runtime.