NAV Navbar
Android SDK

Installing Android SDK

Using Maven


If you use Maven, you can include this library as a dependency.

Using Gradle

compile 'com.wootric:wootric-sdk-android:*'

Add the following to your app’s build.gradle file, inside the dependencies section.

Presenting the survey

WootricSDK task is to present a fully functional survey view with just a few lines of code.

Step 1. Add permissions

<uses-permission android:name="android.permission.INTERNET" />

Add the internet permissions to the AndroidManifest.xml file.

Step 2. Add ProGuard rules

-keepattributes *Annotation*, Signature

##== Wootric ==
-keep class com.wootric.** { *; }

##== Retrofit ==
-keep class retrofit.** { *; }
-keepclassmembernames interface * {
    @retrofit.http.* <methods>;

Add the following to your ProGuard rules file.

Step 3. Initialize Wootric

import com.wootric.androidsdk.Wootric;

// Inside your method
Wootric wootric = Wootric.init(this, <YOUR_CLIENT_ID>, <YOUR_ACCOUNT_TOKEN>);

// TODO: Required to uniquely identify a user. Email is recommended but this can be any unique identifier.
// TODO: The current logged in user's sign-up date as a Unix timestamp.

// Use only for testing


First import the SDK into your Activity of choosing. Then configure the SDK with your client ID and account token.

Sign in at if you haven’t already. If you just signed up on the Wootric homepage, you will be taken directly to an installation page. If you’re a returning visitor, click on the “Settings" button near the top right of the page. Navigate to the Wootric Installation Guide and you will see a unique account_token for you to use.

The client_id can also be found on your Settings page, on the API section.

To display the survey just use wootric.survey();. If the user is eligible (this check is built in the method) the SDK will show the survey.

Step 4. Customize the Survey

Comment out the line wootric.setSurveyImmediately(true) when you are ready for production. Alternatively, leave the line in the code for testing purposes or to survey the customer upon every visit to a view.

import com.wootric.androidsdk.Wootric;
import com.wootric.androidsdk.objects.WootricCustomThankYou;

Wootric wootric = Wootric.init(this, "your_client_id", "NPS­-xxxxxxxx");

// Use only for testing

// Customization
WootricCustomThankYou customThankYou = new WootricCustomThankYou();



This is an important step! Customize your survey with the name of your product or company. As needed, make changes to our trusted survey and sampling defaults. This values can modified from your app.

Wootric Wootric

Step 5. View your Responses Live!

That’s it! Once the WootricSDK is installed, eligible users will immediately start being surveyed. Depending on the traffic of your app, you could start to see responses within a few minutes. Responses will come in to your Wootric dash in real time.

No data yet?

Checkout the Demo dashboard with dummy data.


I’d like to do some testing first. How do I ensure that the survey shows up on demand?

You can easily install Wootric in your development environment for testing. The SDK is already set up to show the survey immediately for testing purposes only.

Additional notes on WootricSDK placement:

For apps with registered users:

If your app has registered users, we recommend that you show the survey only on views that your logged in users will access to allow unique user identification.

For ecommerce apps:

If your app has a checkout flow, we recommend that you show the survey on views that won’t interrupt checkout. The most commonly used location is the transaction completion page.

SDK Reference



While end user email is not required it is HIGHLY recommended to set it if possible.



Set an external ID for the end user. This value is optional.



If setSurveyImmediately is set to true and user wasn’t surveyed yet - eligibility check will return true and survey will be displayed.


wootric.setEndUserCreatedAt(<UNIX Timestamp>);

When creating a new end user for survey, it will set the external creation date (so for example, date, when end user was created in your Android application). This value is also used in eligibility check, to determine if end user should be surveyed.



If not set, defaults to value from admin panel. Used to check if end user was created/last seen earlier than ago and therefore if survey is required.



End user properties can be provided as a HashMap<String, String> object.



If setShowOptOut is set to true then opt out link will be seen.



With this option enabled, promoters (score 9-10) will be taken directly to third (social share) screen, skipping the second (feedback) one.



With this option enabled, the open feedback screen will be skipped and go directly to the third screen (thank you message).

Custom language, audience text and product name configuration:


Please refer to our docs for available languages.

setProductName sets the product name for the end user. This will change the default question. e.g. How likely are you to recommend productName to a friend or co-worker? setRecommendTarget will substitute “friend or co-worker”. It also takes precedence over values set in admin panel.

Custom messages

WootricCustomMessage customMessage = new WootricCustomMessage();
customMessage.setFollowupQuestion("custom followup");
customMessage.setDetractorFollowupQuestion("custom detractor");
customMessage.setPassiveFollowupQuestion("custom passive");
customMessage.setPromoterFollowupQuestion("custom promoter");
customMessage.setPlaceholderText("custom placeholder");
customMessage.setDetractorPlaceholderText("custom detractor placeholder");
customMessage.setPassivePlaceholderText("custom passive placeholder");
customMessage.setPromoterPlaceholderText("custom promoter placeholder");


Wootric provides designated class for providing custom messages -WootricCustomMessages

Custom thank you

WootricCustomThankYou customThankYou = new WootricCustomThankYou();
customThankYou.setText("Thank you!!");
customThankYou.setDetractorText("Detractor thank you");
customThankYou.setPassiveText("Passive thank you");
customThankYou.setPromoterText("Promoter thank you");
customThankYou.setLinkText("Thank you link text");
customThankYou.setDetractorLinkText("Detractor link text");
customThankYou.setPassiveLinkText("Passive link text");
customThankYou.setPromoterLinkText("Promoter link text");

Wootric provides designated class for providing custom thank you -WootricCustomThankYou

Color customization (smartphones only)

// Changes background color and text buttons color for the survey

// Changes score selector color and comment highlight color

// Changes Thank You button color on the final view

// Changes Facebook and Twitter buttons colors

Colors can be customized for the smartphone’s version.

Targeted Sampling

Wootric wootric = Wootric.init(this, CLIENT_ID, ACCOUNT_TOKEN);

HashMap<String, String> properties = new HashMap();
properties.put("Example_string", "pro_plan");
properties.put("Example_value", "12");

wootric.survey("On Purchase Event");

You can trigger surveys based on an end-user’s property, an event that you might be tracking in your app or a combination of both. You must configure the rules that trigger these surveys inside Wootric Settings Panel.

To set the properties for the end user you can pass a HashMap to the setProperties method.

To trigger a survey with an event you ned to use survey(event:).

For more information on how to configure Targeted Sampling, visit How do I setup targeted sampling for in-app surveys?

Survey Callbacks

The WootricSurveyCallback can be used to be informed of when the SDK will or already perform certain actions. To use the Listener, first a class needs to conform to the protocol and assign that class to the WootricSDK.

Imagine you have an Activity/FragmentActivity You can specify that this class implements the WootricSurveyCallback and it will be the one where the methods specified by the protocol are implemented.

// Implements WootricSurveyCallback
public class MainActivity extends FragmentActivity implements WootricSurveyCallback {

// Set the SDK's Callback class

// Implement protocol methods
public void onSurveyWillShow(){


public void onSurveyDidShow(){


public void onSurveyWillHide(){


public void onSurveyDidHide(HashMap values){



Called by the WootricSDK when the survey is about to appear.


Called by the WootricSDK when the survey has already appeared.


Called by the WootricSDK when the survey is about to be dismissed.


Called by the WootricSDK when the survey has disappeared. This method receives a values HashMap with the score and the text provided by the end user. If the end user dismissed the survey, it returns a score of -1.


Rate application on the Play Store

import com.wootric.androidsdk.Wootric;
import com.wootric.androidsdk.objects.WootricCustomThankYou;


Wootric wootric = Wootric.init(this, CLIENT_ID, ACCOUNT_TOKEN);


// Uncomment for testing
// NOTE: do not use in production
// wootric.setSurveyImmediately(true);

// Will skip the Feedback view for Promoters

WootricCustomThankYou customThankYou = new WootricCustomThankYou();
Uri uri = Uri.parse("market://details?id=com.yourcompany.appid");
customThankYou.setPromoterLinkText("Rate our app!");


You can set the last button to go to the Play Store so users can rate your app.


Set End User Properties

import com.wootric.androidsdk.Wootric;
import com.wootric.androidsdk.objects.WootricCustomThankYou;
import java.util.HashMap;


Wootric wootric = Wootric.init(this, CLIENT_ID, ACCOUNT_TOKEN);


// Uncomment for testing
// NOTE: do not use in production
// wootric.setSurveyImmediately(true);

// Set end user's properties
HashMap<String, String> properties = new HashMap<String, String>();
properties.put("company", "Wootric");
properties.put("type", "awesome");
properties.put("os", "Android");
// Integer representing the date (Unix timestamp format) of the user's last order with the key suffixed with "_date"
properties.put("last_order_date", "1479316287");
// Integer representing the user's total purchases with the key suffixed with "_amount"
properties.put("total_purchase_amount", "10");


Setting end user properties will help you segment and filter results.

Wootric currently supports Integers, Strings, and Unix formatted dates as values.

Integers must be suffixed with _amount and dates must be in Unix timestamp format and suffixed with _date.

Keys cannot contain characters such as ‘$’, ‘.’ or the NULL character. Values cannot be nested hashes or arrays.



Survey not showing up?

Check that client ID and account token are correct. Account token should have a “NPS-xxxxxxxx” format

Does the SDK work with Amazon devices?

Yes, the SDK has been tested with Amazon devices.

I’m using setSurveyImmediately but getting User not eligible

Check that Wootric Mobile Switch is enabled on your Acount Settings


Segment Integration

Wootric provides an integration for Segment. The library can be found on our Github.

This library is distributed as Android library project so it can be included by referencing it as a library project.

Install with Maven


If you use Maven, you can include this library as a dependency.

Install with Gradle

compile 'com.wootric:analytics-integration-wootric:0.1.4'

dependencies {
  repositories {
    maven { url '' }

  compile ''

It is assumed that Segment’s android analytics is available. The latest version can be added as dependency this way.

Intialize Analytics


public class MainApplication extends Application {

    Analytics analytics;

    public void onCreate() {

        analytics = new Analytics.Builder(this, "write_key")

    public Analytics getAnalytics() {
        return analytics;

Analytics object should be initialized in the Application class, specifying that the WootricIntegration should be user.

Wootric object

import com.wootric.androidsdk.Wootric;

public class MainActivity extends Activity {
    protected void onResume() {

        Analytics analytics = ((MainApplication) getApplication()).getAnalytics();
        analytics.onIntegrationReady(WootricIntegration.FACTORY.key(), new Analytics.Callback<Wootric>() {
            public void onReady(Wootric wootric) {
                // Set all aptional configuration here like:
                // wootric.setSurveyImmediately(true);
                // wootric.setLanguageCode("PL");

In your Activity of choosing the Wootric object can be used to set all optional configurations and call survey() method.

mParticle Integration

Wootric provides an integration for mParticle.

Instructions on how to setup the mParticle Android SDK can be found on mParticle’s Github.