Prerequisites
To Integrate Haptik Android SDK, you must obtain the following credentials to get started:
- Client ID/Account 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)
Minimum and Target SDK versions of the Haptik SDK
- minSdkVersion 21
- targetSdkVersion 30
Add Haptik SDK in your Android Project
Update settings.gradle files
Add the following lines of code to your project's root settings.gradle or build.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.12.3'
.
.
}