Android Survey Wall Preview
If your app is in test mode, you must use a test user. Configure test users in "Test Devices" on the dashboard.
Experiencing issues? Contact developers@tapresearch.com for assistance.
Survey Wall Preview requires SDK v3.4.2 or higher and must be enabled by your TapResearch account representative. Contact developers@tapresearch.com to get started.
Installation
- Integration guide: See the Android SDK documentation
- Example apps: Available on GitHub
Survey Wall Preview
Survey Wall Preview enables you to:
- Faster survey access - Provide a quicker path into surveys
- Custom UI - Create your own native presentation with survey tiles/cards
- Up to 5 surveys - Display up to 5 survey options at once
Best Practices
Before you begin:
- Requires TapResearch SDK Android v3.4.2 or higher
- Must be enabled by the TapResearch team - contact your account manager
Key Considerations for Survey Tiles
When designing your survey tiles/cards, consider these elements:
1. The Profile Survey
- Required first: Users must complete the Profile Survey before accessing other surveys
- New users only: Only shown to users who are new to TapResearch
- Native display example:
2. Survey Details (LOI, Currency, Reward)
- Available data: Length of Interview (LOI), Currency Name, and Reward Amount
- Recommendation: Display all three values so users can make informed decisions
- Native display example:
3. Hot Tiles (v3.6.0-rc0+)
- What it means: Surveys with exceptional scores offering the best time-to-reward ratio
- Optional but recommended: Increases user engagement and click-through rates
- Native display example:
4. Currency Sales (v3.6.0-rc0+)
- Purpose: Show users the original value and sale multiplier during promotions
- Optional: Only needed if you plan to run currency sales
- Native display example:
5. More Surveys Link
- Purpose: Direct link to the full survey wall showing more than 5 surveys
- Setup: See manual survey wall placements
- Native display example:
Contact your account manager or reach out via Slack with any questions!
Implementation Flow
The code below demonstrates how to:
- Fetch surveys after SDK initialization
- Set up a surveys refreshed listener (required)
Key points:
- Fetch surveys only after the SDK Ready event
- Render the
TRSurvey
objects in your UI (seehandleMySurveys
function) - Required: Set the surveys refreshed listener to get updates when surveys change
Attempting to fetch surveys before SDK Ready will result in an error and no surveys will be returned.
- Kotlin
- Java
TapResearch.initialize(
apiToken = "my-api-token",
userIdentifier = "my-user-identifier",
context = this@MainActivity,
errorCallback = { error -> handleMyError(error) },
sdkReadyCallback = {
Log.d(LOG_TAG, "SDK is ready")
// Surveys can be fetched anytime after SDK Ready
val surveys = TapResearch.getSurveysForPlacement("my-placement-tag"){}
handleMySurveys(surveys) // your surveys handler; handle null or empty list
// REQUIRED: Set your surveys refreshed listener
TapResearch.setSurveysRefreshedListener(object: TRSurveysRefreshedListener{
override fun onSurveysRefreshedForPlacement(placementTag: String) {
if (placementTag == "my-placement-tag") {
val updatedSurveys = TapResearch.getSurveysForPlacement(placementTag) {}
handleMySurveys(updatedSurveys) // your surveys handler; handle null or empty list
}
}
})
},
rewardCallback = handleMyRewards,
initOptions = null,
qqDataCallback = null,
)
TapResearch.INSTANCE.initialize(
"my-api-token",
"my-user-identifier",
MainActivity.this, // context
this::handleMyRewards,
this::handleMyError,
// SDK ready handler
() -> {
Log.d(LOG_TAG, "SDK Ready");
// Surveys can be fetched anytime after SDK Ready
List<TRSurvey> surveys = TapResearch.INSTANCE.getSurveysForPlacement("my-placement-tag", null);
handleMySurveys(surveys); // your surveys handler; handle null or empty list
// REQUIRED: Set your surveys refreshed listener
TapResearch.INSTANCE.setSurveysRefreshedListener(placementTag -> {
if (placementTag.equals("my-placement-tag")) {
List<TRSurvey> updatedSurveys = TapResearch.INSTANCE.getSurveysForPlacement(placementTag, null);
handleMySurveys(updatedSurveys);
}
});
},
this::handleQuickQuestion,
null //tapInitOptions
);
TRSurvey Objects
The list of TRSurvey
objects can be used to render your UI.
data class TRSurvey(
val surveyId: String? = null,
val lengthInMinutes: Int? = null,
val rewardAmount: Float? = null,
val currencyName: String? = null,
// Attributes below available in version 3.6.0--rc0 or higher
var isSale: Boolean? = null,
var saleEndDate: String? = null,
var saleMultiplier: Float? = null,
var preSaleRewardAmount: Float? = null,
var isHotTile: Boolean? = null,
)
Showing a survey
You will need the surveyId from the TRSurvey object in order to show the survey:
- Kotlin
- Java
TapResearch.showSurveyForPlacement(
placementTag = "my-placement-tag",
surveyId = survey.surveyId, // from TRSurvey object
customParameters = null,
contentListener = object : TRContentCallback {
override fun onTapResearchContentShown(placementTag: String) {
// survey is being shown
}
override fun onTapResearchContentDismissed(placementTag: String) {
// survey was dismissed
}
},
errorListener = object : TRErrorCallback {
override fun onTapResearchDidError(trError: TRError) {
// a rare error occurred while showing the survey
}
}
)
TapResearch.INSTANCE.showSurveyForPlacement(
"my-placement-tag",
survey.surveyId, // from TRSurvey object
null, // custom parameters
new TRContentCallback() {
@Override
public void onTapResearchContentShown(String placementTag) {
// survey is being shown
}
@Override
public void onTapResearchContentDismissed(String placementTag) {
// survey was dismissed
}
},
new TRErrorCallback() {
@Override
public void onTapResearchDidError(TRError trError) {
// a rare error occurred while showing the survey
}
}
);
Passing custom parameters
If you need to pass custom parameters, please use:
- Kotlin
- Java
val customParameters = HashMap<String, Any>()
customParameters["isVIP"] = 1
TapResearch.showSurveyForPlacement(
placementTag = "my-placement-tag",
surveyId = survey.surveyId, // from your TRSurvey object
customParameters = customParameters,
contentListener = object : TRContentCallback {
override fun onTapResearchContentShown(placementTag: String) {
// survey is being shown
}
override fun onTapResearchContentDismissed(placementTag: String) {
// survey has been dismissed
}
},
errorListener = object : TRErrorCallback {
override fun onTapResearchDidError(trError: TRError) {
// rare error occurred while showing the survey
}
}
)
HashMap<String, Object> customParameters = new HashMap<>();
customParameters.put("isVIP", 1);
TapResearch.INSTANCE.showSurveyForPlacement(
"my-placement-tag",
survey.surveyId, // from your TRSurvey object
customParameters,
new TRContentCallback() {
@Override
public void onTapResearchContentShown(String placementTag) {
// survey is being shown
}
@Override
public void onTapResearchContentDismissed(String placementTag) {
// survey has been dismissed
}
},
new TRErrorCallback() {
@Override
public void onTapResearchDidError(TRError trError) {
// a rare error occurred while showing the survey
}
}
);