Installation
Prerequisites: minimum supported Android version is 21 (Lollipop)
Add MavenCentral to your root Gradle file project repositories.
allprojects {
repositories {
mavenCentral()
}
}
Import library features you will use. Core library is mandatory, both accounts and in-app-payments are optional.
apply plugin: 'com.android.application'
android { ... }
dependencies {
// ...
// kevin. Android SDK
implementation "eu.kevin.android:core:2.0.0"
implementation "eu.kevin.android:accounts:2.0.0"
implementation "eu.kevin.android:in-app-payments:2.0.0"
}
Current version is 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()
)
}
}
Copy link