Initialize the DEUNA Android SDK in your application.
Requirements
To use the DEUNA Android SDK, you must meet the following requirements:
- Your project must use a minimum Android API version 24 or higher
- Knowledge of Android development with Kotlin or Java.
- An active account at DEUNA.
- Valid DEUNA credentials.
- Minimum configurations in your Android project:
minSdkVersion24 or higher.
If you experience any delays in obtaining your credentials, please contact [email protected].
Install the SDK Android
Web SDK initialization begins.
1. Add the JitPack repository
Add the jitpack repository in the block dependencyResolutionManagement in your root file settings.gradle ..
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // <-- Add this line
}
}dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") } // <-- AGREGAR ESTA LINEA
}
}If you don't have the block in your project, then add the repository in the block repositories which is located in:
build.gradleroot fileapp/build.gradlefile
allprojects {
repositories {
...
maven { url 'https://jitpack.io' } // <-- Add this line
}
}2. Configure the build.gradle file
Open app/build.gradle in your Android project.
Your project must use a minimum version of Android API 22 or higher.
android {
...
defaultConfig {
...
minSdk 24 // Or superior
...
}
}
3. Add dependencies
Add the following dependencies in your project's app/build.gradle file.
dependencies {
.
.
.
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.github.deuna-developers:deuna-sdk-android:2.12.3' // DEUNA SDK
}dependencies {
.
.
.
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.github.deuna-developers:deuna-sdk-android:2.12.3") // DEUNA SDK
}
Test SDK features in a development environment to validate proper functionality before releasing your app.

4. Initialize the SDK
Initialize the SDK or create an instance of the class DeunaSDK.
Through Initialization
// Initialize the SDK by the creation of a singleton
DeunaSDK.initialize(
environment = Environment.SANDBOX, // Test or production environments (Environment.SANDBOX or Environment.PRODUCTION)
publicApiKey = "YOUR_PUBLIC_API_KEY" // DEUNA Public key
)
// Now you can use the SDK through a shared instance of DeunaSDK
DeunaSDK.shared
// Example
DeunaSDK.shared.initCheckout(...)
Instance creation
val deunaSDK = DeunaSDK(
environment = Environment.SANDBOX, // Test or production environments (Environment.SANDBOX or Environment.PRODUCTION)
publicApiKey = "YOUR_PUBLIC_API_KEY" // DEUNA Public key
)
// SDK usage
deunaSDK.initCheckout(...)
5. Choose the widget component
Continue the integration process following the specific instructions for each component.
Choose the component:
Want to fully customize your widget? Visit the CustomStyle Customization guide for a complete reference of all supported customization options.