SDK 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 SDK Application on Kotzilla
Follow Step 1 from the Android app setup guide to register your SDK app as an Android 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.
As an Android library, configure the versionName
property in the Kotzilla
plugin section:
kotzilla {
// Android Library version
versionName = "1.0.0"
}
Be sure to have your kotzilla.json
in your SDK App module.
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()
. - Retrieve your API key from your Kotzilla json file with
context.apiKey()
- 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(...)
}
Congratulations! The installation is now complete, and you’re all set to start debugging your app.