Step 1: Migrate to AndroidX
Our SDK is set up to work with AndroidX, so the first step is to migrate your project to AndroidX if you haven’t already done so.
Step 2: Add the Skip SDK root level dependencies
Add the following to your root level build.gradle
file if they do not already exist
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 3: Enable Desugaring
If you target Android devices running below API 26, you need to use Android Gradle plugin 4.0 or newer and enable core library desugaring.
Step 4: Add the Skip SDK dependency
Add the Skip SDK dependency to your build.gradle
file.
implementation 'com.github.goskip.mco:skipsdk-ui:1.0.8'
Step 5: Add an application class to your app if one does not already exist.
import android.app.Application
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
// initialize Skip SDK here
}
}
- Open AndroidManifest.xml file of your app and locate
<application>
tag. - Add an attribute
android:name
and set it to your new application class.
<application
android:name=".MainApplication"
<!-- ... -->
</application>
Step 6: Initialize the Skip SDK inside of your Application class
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
// initialize Skip SDK here
SkipDatabaseDriverFactory.context = this
}
}
Step 7: Launch the Skip Experience
In order to launch the Skip experience, you will need to call the SkipUISDK.launchSkip
function.
There are several different options for launching the Skip Experience that we will go over in the configuration section.