Setup for Isolated Koin Application (Android SDK or Library Projects)
Does your app use Koin context isolation like Android SDK and white-label apps? This solution is for you.
Setup Cloud-Inject as Standalone Instance (since 0.10.0-Beta5)
In your Kotlin app, you need to activate the Kotzilla platform with following code
CloudInjectCoreSDK()
- to create a new Cloud-Inject SDK instancesetupAndConnect()
- to connect Cloud-Inject platform with given appKey and version name, return current instanceanalyticsLogger(cloudInjectInstance = ciInstance)
- specify what CloudInject instance to use in analytics logger
To start and connect the SDK, you can do as follow:
// Setup & connect Cloud-Inject
val ciInstance = CloudInjectCoreSDK().setupAndConnect("dev.johnoreilly.confetti","1.0")
// Start Koin
startKoin {
analyticsLogger(cloudInjectInstance = ciInstance)
modules(...)
}
note
if your project is an Android library, be sure to setup the versionName
in the plugin settings section.