Installation

Supported platform versions are 19 (KitKat) to 28 (Pie) . Checkout more on Distribution dashboard.
  • Step 1. Import SDK

    To import our library add https://android-sdk.user.com repository to project’s build.gradle file:

    allprojects {
        repositories {
            …
            maven {
                url 'https://android-sdk.user.com'
            }
        }
    }

    and com.user:android-sdk:1.0.0 dependence to you app’s build.gradle file

    dependencies {
        implementation 'com.user:android-sdk:1.0.0'
    }
  • Step 2. Configure SDK in your app

    In your Application root file initialize UserCom.Builder with your SDK API key, context and base URL. It will initialize UserCom instance.

    You can generate API key in User.com web panel. It was described in getting started section

    If you want to track you client’s mobile view screens activities you also can append .trackAllActivities(true) like on the sample code below:

    public class App extends Application {
    
        public static final String TAG = App.class.getSimpleName();
    
        @Override
        public void onCreate() {
            super.onCreate();
            new UserCom.Builder(
                    this,
                    "api_secret", //your api secret key generated in User.com webpanel details
                    "https://<your_app_subdomain>.user.com"
            )
                    .trackAllActivities(true)  // false by default
                    .openLinksInChromeCustomTabs(true) // true by default
                    .setCustomTabsBuilder(getCustomTabsBuilder())
                    .build();
        }
    
        private static CustomTabsIntent.Builder getCustomTabsBuilder() {
            CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
            builder.setToolbarColor(Color.GREEN);
            return builder;
        }
    }