Skip to content

Android project setup

Dependency

Include the dependency in your module's build.gradle file:

dependencies {
   implementation "com.oscleton.sdk:core:0.9.0"
}

Initialization

Before using the APIs, make sure to initialize the SDK at application launch, usually called in a custom Application's onCreate() method:

class App : Application() {

    override fun onCreate() {
        super.onCreate()

        // Initialize the SDK
        OscletonSDK.instance.initialize()
    }

}
public class App extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        // Initialize the SDK
        OscletonSDK.getInstance().initialize();
    }

}

and don't forget to include it in the Android manifest.xml file as follow:

<application
    android:name=".App"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    ...>
</application>