Android SDK Installation
Follow these steps to get the Preferabli Data SDK up and running inside your application.
Step 1. Import JitPack
To begin installation you will need to implement JitPack. JitPack is a package repository for Git that will allow you to import the Preferabli Data SDK git repo. Simply add the JitPack repository to your project's build file:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}Step 2. Import the Preferabli Data SDK into your project.
To integrate the SDK into your Android Studio project using Gradle, specify it in your app's build.gradle in the dependencies section:
dependencies {
implementation 'com.github.winering:Preferabli-for-Android:master-SNAPSHOT'
}Step 3. Initialize the SDK.
Next import the SDK into your app's Application class using import classes.Preferabli. Your application class should extend from android.app.Application and be declared in your AndroidManifest.xml. See Google's Android docs for more information.
Now it's time to initialize Preferabli in your project's onCreate method.
Use Preferabli.initialize(Application application, String client_interface, long integration_id).
Your Application class should end up looking something like this:
import classes.Preferabli;
public class Application extends android.app.Application {
@Override
public void onCreate() {
super.onCreate();
Preferabli.initialize(this, "YOUR_CLIENT_INTERFACE_HERE", YOUR_INTEGRATION_ID);
}
}
Installation complete.That was easy. You are ready to start using the Preferabli Data SDK.
Updated about 1 year ago
