Installation

Prerequisites: minimum supported Android version is 21 (Lollipop).

Add MavenCentral to your root Gradle file project repositories.

allprojects {
    repositories {
        mavenCentral()
    }
}

Add SDK dependencies into your project:

eu.kevin.android:core is mandatory

eu.kevin.android:accounts and eu.kevin.android:in-app-payments are optional

apply plugin: 'com.android.application'

android { ... }

dependencies {
  // kevin. Android SDK
  implementation "eu.kevin.android:core:<latest-version>"
  implementation "eu.kevin.android:accounts:<latest-version>"
  implementation "eu.kevin.android:in-app-payments:<latest-version>"
}

Latest SDK version can be found here.

Initialise plugins you will use in your Application file. Check our customisations section for a guide on how to customise SDK UI.

class KevinApplication : Application() {
    
    override fun onCreate() {
        super.onCreate()
        //  setup optional theme. By default we will use Theme.Kevin.Base
        //  but you can create your own theme that extends Theme.Kevin.Base
        Kevin.setTheme(R.style.Your_Kevin_Theme)
        //  set optional locale, default is phone locale
        Kevin.setLocale(Locale("en"))
        //  initialize required plugins with your callback urls
        KevinAccountsPlugin.configure(
            KevinAccountsConfiguration.builder()
                .setCallbackUrl("https://your.callback.url")
                .build()
        )
        KevinPaymentsPlugin.configure(
            KevinPaymentsConfiguration.builder()
                .setCallbackUrl("https://your.callback.url")
                .build()
        )
    }
}

Last updated