Setup for SDK libraries
This guide will walk you through registering your SDK library on the Kotzilla Platform and setting up the Kotzilla SDK. Follow these steps to get started!
Step 1 - Register your application on Kotzilla
Follow Step 1 from the Android app setup guide to register your app on the Kotzilla Platform.
Step 2 - Set up the Kotzilla SDK
Refer to Step 2 in the Android app setup guide to download the configuration file and update your Gradle files with the Kotzilla SDK dependency.
Step 3 - Start the Kotzilla SDK in your SDK library
To set up the Kotzilla SDK in a Kotlin SDK library, follow these instructions to create a standalone instance:
Initialize the Kotzilla SDK
- Create a new instance of
KotzillaCoreSDK
. - Set up Kotzilla with your API token and app version using
setup()
. - Connect to the Kotzilla platform with
connect()
. - Specify the Kotzilla instance in
analyticsLogger()
.
Here’s the code to set up and connect the Kotzilla SDK in your library:
// Setup & connect Kotzilla SDK
val instance = KotzillaCoreSDK()
.setup(context.apiKey(), "1.0")
.connect()
Attach your Kotzilla SDK instance to your Koin configuration:
// Start Koin
startKoin {
analyticsLogger(sdkInstance = instance)
modules(...)
}
If your project is an Android library, configure the versionName
in the plugin section:
kotzilla {
// Android Library version
versionName = "1.0.0"
}
Congratulations! The installation is now complete, and you’re all set to start debugging your app.