Dramwise SDK Integration Guide
Follow these steps to integrate the Dramwise SDK into your Android application.
1. Add the Dependency
Add the Dramwise SDK dependency to your app's build.gradle.kts file.
2. Initialize the SDK
In your Application class, initialize the SDK in the onCreate method:
import android.app.Application
import am.dramwise.sdk.DramwiseSdk
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
DramwiseSdk.initialize(this, "YOUR-API-KEY")
}
}
MyApplication class in the AndroidManifest.xml file.
3. Use the DramwiseScreen Composable
You can now use the DramwiseScreen composable in your app. Pass a list of BasicTransaction objects to it.
import androidx.compose.runtime.Composable
import am.dramwise.sdk.ui.DramwiseScreen
import am.dramwise.sdk.data.models.BasicTransaction
@Composable
fun MyScreen() {
val transactions: List<BasicTransaction> = // Your list of transactions
DramwiseScreen(transactions = transactions)
}
That's it! You have successfully integrated the Dramwise SDK.