Android Mobile Browser Plugin

Android Browser Plugin SDK Documentation

1.0.11Initial version22/07/2022SB
1.2.0Introduced show Earnings feature flag10/08/2022SB
1.3.0Introduced earthmark feature flag06/09/2022SB
1.4.0Updates to include:

- Custom logo
- Logic improvements
1.5.0Fixed an issue causing crash on Android 711/10/2022SB
1.6.0Updates to include:
- Fixed an issue when sharing a web page
- Fixed an issue for deal activation in the wrong brand
- Fixed an issue when the deal popup is shown in domains with no deals
- Fixed an issue that was removing the deal popup when scrolling
1.7.0Fixed an issue on Android 719/10/2022CPI
1.8.0Added cashback configuration28/10/2022CPI
1.9.0Added charity configuration07/11/2022CPI
2.0.0Updates to include:
- Bug fixes
- Added new service status check function
2.2.0Updates to include:
- Settings activation flow more user-friendly
2.3.0Updates to include:
- Spanish, French, German & Korean language support
- Network requests bug-fixes
- Coupons view bug-fixes
2.4.0 Added Kindred Wallet Sign in24/01/2023CPI
2.5.0Updates to include:
- Added logic improvements
2.6.0Updates to include:
- Added UTM parameters for analytics
- Comeback activity bug-fix
2.7.1Updates to include:
- Improved error tracking
- Country/currency re-configuration after service starts is now possible
2.7.2Updates to include:
- Addition of Kindred License Agreement

Getting Started

Follow these instructions to add the Kindred Browser Plugin SDK to an existing application.

For any questions or support with your integration, or to receive your API details, please email [email protected]


The Android Mobile Browser SDK only works on the Chrome Browser. Support for other browsers is coming soon.

  • Instructions contained by "[]" need to be adapted for each application.
  • Instructions contained by "{}" might change on each SDK revision.
  1. First, you need to generate an access token from your account;

    1. From Github, click your user icon, then click on settings.

    2. At the bottom, click Developer Settings

    3. Click on Personal access tokens and then click on Generate new token.

    4. Add a note, select the expiration time, select the checkbox "read:packages" and click to "Generate token"

  2. Add the file in the root of your project. This will include authentication for Maven repositories and authentication for the Kindred SDK.
    Replace the USERNAME with your Github user name and the TOKEN by the code that has been generated in the previous step

ext {
  1. Add the SDK’s and dependencies maven repository to settings.gradle file and make sure you apply the "":
// settings.gradle
apply from: ""

dependencyResolutionManagement {
    repositories {

        // Kindred SDK Dependency
        maven {
            name = "GitHubPackages"
            url = uri("")
            credentials {
              username = kindred_sdk_user
              password = kindred_sdk_secret_key
} = "your_app"
include ':app'
  1. Add the Auth Settings to the defaultConfig in the module build.gradle. This is later passed down to the Kindred SDK during configuration. Make sure you apply the "":
// app/build.gradle
apply from: "../"
android {
      defaultConfig {
        buildConfigField("String", "API_URL", "\"" + API_URL + "\"")
        buildConfigField("String", "ASSETS_CDN_URL", "\"" + ASSETS_CDN_URL + "\"")
        buildConfigField("String", "AUTH_CLIENT_ID", "\"" + AUTH_CLIENT_ID + "\"")
        buildConfigField("String", "AUTH_CLIENT_SECRET", "\"" + AUTH_CLIENT_SECRET + "\"")
        buildConfigField("String", "AUTH_SHARED_KEY", "\"" + AUTH_SHARED_KEY + "\"")
  1. Edit the app’s module build.gradle file, and add dependencies with the latest version.
// app/build.gradle
implementation 'com.kindred.libraries:browser-sdk:2.6.0'
  1. Create the Deals Accessibility service class in the app module

    Note: find out more about the configuration flags below, in the section Kindred feature configuration

    Note: KindredUserConfiguration is deprecated and will be removed in future versions. We suggest the use of the new functions "setUserCountry" & "setUserCurrency" from KidnredFramework.

// DealAccessibilityService.kt

import com.kindred.browser_sdk.KindredAbstractAccessibilityService
import com.kindred.browser_sdk.configuration.*

class DealsAccessibilityService : KindredAbstractAccessibilityService() {

    companion object {
        val kindredApiConfiguration = KindredApiConfiguration(
            urlBase = BuildConfig.API_URL,
            clientID = BuildConfig.AUTH_CLIENT_ID,
            clientSecret = BuildConfig.AUTH_CLIENT_SECRET,
            sharedKey = BuildConfig.AUTH_SHARED_KEY,
            cdnUrl = BuildConfig.ASSETS_CDN_URL

    override fun configureService() = KindredAccessibilityServiceConfiguration(
        api = kindredApiConfiguration,
        user = KindredUserConfiguration(
            userCurrency = "CURRENCY_CODE",
            userCountry = "COUNTRY_CODE"
        features = KindredFeaturesConfiguration(
          showEarningsConfirmationMessage = true,
            earthMarkScoring = true,
          showCashbackLabel = true
        charity = KindredCharityConfiguration(
            charityId = "CHARITY_ID",
            charityShare = CHARITY_SHARE

    override fun onCreate() {

  1. Setting the user ID (optional)

The default configuration gives each user a unique user ID. If you wish to provide your own user ID or a unique identifier for the user for analytic purposes, you can provide the SDK with you own unique ID as follows:

// DealAccessibilityService.kt
    override fun onCreate() {

  1. Setting a custom icon (optional)

By default, the service will use a Kindred logo but it's possible to set a custom icon by providing the drawable Int in this function:

// DealAccessibilityService.kt
    override fun onCreate() {
  1. Setting an activity to comeback after service activation (optional) (Min Android 7)

You can use this function to set a comeback intent. After the service is activated by the user, they will get returned to the activity if the set intent automatically:

// DealAccessibilityService.kt
    override fun onCreate() {
  1. Add the accessibility service xml file in the res/xml folder.
// accessibilityservice.xml
<accessibility-service xmlns:android=""
  1. Add permissions to the AndroidManifest.xml file
// AndroidManifest.xml
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
  1. Add accessibility service to the AndroidManifest.xml file
// AndroidManifest.xml
                <action android:name="android.accessibilityservice.AccessibilityService" />
                android:resource="@xml/accessibilityservice" />
  1. Add string values to the res/values/strings.xml (Note, you can change these values as applicable)
// strings.xml
    <string name="accessibility_service_description">By allowing the Accessibility Permission, you permit “App Name” to access data about your URLs. We do this to enable you to save money when you are shopping on your favourite brands, coupon codes will pop up at checkout, helping you to save!</string>
    <string name="accessibility_service_label">Kindred</string>

Kindred Framework

KindredFramework is an object class we expose to facilitate some functionalities related to the service.


This function will return the current status of the service, a boolean indicating if the service is currently running or not.

val serviceStatus = KindredFramework.isAccessibilityServiceEnabled(context)


This function will open the accessibility settings of the service for its activation and will display a toast message with the received text.

KindredFramework.openAccessibilityServiceSettings(context, "INCLUDE YOUR TEXT HERE")

This toast message is a tiny popup at the bottom of the screen and it's centred. It will disappear after a fraction of a second.


This functions wil receive the context, the kindredApiConfiguration companion object that was created in the service and a callback. It will open the wallet sign in web page in the default browser.
The callback will receive one of three states: _SUCCEED, NO_AUTH (No authentication was detected during the process), ERROR (Something else went wrong)

            KindredFramework.openKindredWallet(this, DealsAccessibilityService.kindredApiConfiguration) {
                Log.d("kk", "$it")


This function allows you to override the country code of the initial service configuration or add one if none was specified at the service start.

            KindredFramework.setUserCountry("COUNTRY_CODE", context)


This function allows you to override the currency code of the initial service configuration or add one if none was specified at the service start.

            KindredFramework.setUserCurrency("CURRENCY_CODE", context)

Kindred feature configuration

What is "Show Earnings" feature flag?

If you would like us to popup to the user whenever they've made any cash back or donated to a cause, you can set this feature flag on when setting up the configuration on the DealsAccessibilityService.

What is "EarthMark" feature flag?

Earthmark have developed a rating system to show how "green" retailers really are. Earthmark's rating system will now be highlighted within the Kindred technology so partners can help their users make more informed choices to shop sustainably.

What is "Show Cashback label" feature flag?

You can turn on/off the cashback label feature flag. Having it on means that when we detect a cashback deal, the user will be notified through the popups with text indicating how much cashback they would be earning. Having the feature off means that there will not be any reference to cashback or cashback amount instead, will reference a deal.

Feature flag off

Feature flag on

Kindred SDK Size

What's the size of our SDK in your project and APK?

Adding the Kindred SDK to a sample project adds an extra 0.71 MB to the total APK size

Before SDK:

  • Project size: 35.4 MB
  • APK size: 5.25 MB

After SDK:

  • Project size: 46.1 MB
  • APK size: 5.96 MB

License Agreement: