Installation of Android SDK
Prerequisites
To Integrate Haptik Android SDK, you must obtain the following credentials to get started:
- Client ID(Required): Unique Haptik identification number associated with your account.
- Business ID(Required): Unique business identification number.
- Base URL(Required): Link pointing to specific server environment (Different for Staging and Production)
- Auth Type: authentication type to be used for user registration. Required only for custom signup.
- Auth ID: authentication type to be used for user registration. Required only for custom signup.
Minimum and Target SDK versions of the Haptik SDK
- minSdkVersion 21
- targetSdkVersion 30
Add Haptik SDK in your Android Project
Update build.gradle files
Add the following lines of code to your project's root settings.gradle.
allprojects { repositories { . . . maven { url "https://artifactory.hellohaptik.com/artifactory/libs-release-local" credentials { username "<ASK HAPTIK FOR USERNAME>" password "<ASK HAPTIK FOR PASSWORD>" } } google() jcenter() . . . } }
Haptik will provide the required username and password while providing access to the SDK.
Add Haptik SDK dependency
Add the following lines of code to your app's build.gradle file :
dependencies { . . implementation 'ai.haptik.android.sdk:haptiklib-wrapper:1.2.1' . . }