Skip to main content
Version: 3.x

Android Survey Wall Preview

Test Mode

If your app is in test mode, you must use a test user. Configure test users in "Test Devices" on the dashboard.

Support

Experiencing issues? Contact developers@tapresearch.com for assistance.

Enabling Survey Wall Preview

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

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:
    Profile tile preview

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:
    Tiles preview

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:
    Hot tile

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:
    Currency Sale Preview
Need Help?

Contact your account manager or reach out via Slack with any questions!

Implementation Flow

The code below demonstrates how to:

  1. Fetch surveys after SDK initialization
  2. Set up a surveys refreshed listener (required)

Key points:

  • Fetch surveys only after the SDK Ready event
  • Render the TRSurvey objects in your UI (see handleMySurveys function)
  • Required: Set the surveys refreshed listener to get updates when surveys change
danger

Attempting to fetch surveys before SDK Ready will result in an error and no surveys will be returned.

        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,
)

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:

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
}
}
)

Passing custom parameters

If you need to pass custom parameters, please use:

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
}
}
)