For Android Apps
Prerequisites
Before getting started, ensure your development environment meets the following prerequisites:
- Android Studio Bumblebee 2021.1.1 or higher.
- JDK 11 or higher.
- Kotlin Plugin for Android Studio, version 1.6.10 or higher.
- An Android Virtual Device (AVD) using a supported CPU architecture.
Contact Us
Additional documentation is available on request. Contact us for further information.
Step 1: Register DataSapien project (Beta)
Before you can add Mobile SDK to your Android app, you need to request an enterprise project to connect to your app. Visit TODO.
Step 2: Add a DataSapien configuration file (Beta)
To use Mobile SDK in your Android app, you need to register your app with your DataSapien Enterprise project. Configuration file contains:
- Enabled Module List
- License
- Create DS-Info.plist to obtain your Firebase Apple platforms config file (DS-Info.plist).
- Move your config file into the module (app-level) root directory of your app.
If you have multiple bundle IDs in your project, you must associate each bundle ID with the configuration file.
Step 3: Add DataSapien SDK to your app
If you want to import the SDK without using Maven you can import the framework manually. Details below:
- Download the latest SDK version.
- Extract the framework from the zip file.
- Copy DSSDK.aar file to your project’s
/lib
folder (if you don’t have it, create the folder first) - Add SDK to your application’s
build.gradle
:`
dependencies {
implementation files('libs/DSSDK.aar')
}
- Add Google Play Services to your build.gradle:
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
}
Step 4: Initialize SDK in your app
- To initialize SDK you must modify your main Activity’s
onCreate()
method
import com.datasapien.ds
DS.connect(getApplicationContext(), "SDK_KEY_GOES_HERE", new DSConnectionListener() {
@Override
public void onConnectSuccess() {
this.onConnectSuccess();
}
@Override
public void onConnectFailure() {
this.onConnectFailure();
}
});