Installation
Prerequisites: minimum supported Android version is 21 (Lollipop)
Add MavenCentral to your root Gradle file project repositories.
1
allprojects {
2
repositories {
3
mavenCentral()
4
}
5
}
Copied!
Import library features you will use. Core library is mandatory, both accounts and in-app-payments are optional.
1
apply plugin: 'com.android.application'
2
3
android { ... }
4
5
dependencies {
6
// ...
7
8
// kevin. Android SDK
9
implementation "eu.kevin.android:core:2.0.0"
10
implementation "eu.kevin.android:accounts:2.0.0"
11
implementation "eu.kevin.android:in-app-payments:2.0.0"
12
}
Copied!
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.
1
class KevinApplication : Application() {
2
3
override fun onCreate() {
4
super.onCreate()
5
// setup optional theme. By default we will use Theme.Kevin.Base
6
// but you can create your own theme that extends Theme.Kevin.Base
7
Kevin.setTheme(R.style.Your_Kevin_Theme)
8
// set optional locale, default is phone locale
9
Kevin.setLocale(Locale("en"))
10
// initialize required plugins with your callback urls
11
KevinAccountsPlugin.configure(
12
KevinAccountsConfiguration.builder()
13
.setCallbackUrl("https://your.callback.url")
14
.build()
15
)
16
KevinPaymentsPlugin.configure(
17
KevinPaymentsConfiguration.builder()
18
.setCallbackUrl("https://your.callback.url")
19
.build()
20
)
21
}
22
}
Copied!
Copy link