Core SDK
The base Android Cloudike SDK — shared infrastructure the other Android SDKs may depend on.
Applies to Core SDK 5.5.2+
Installation
Declare Cloudike's private Maven repository in your project's settings.gradle.kts (artifactory_username/artifactory_password are credentials provided by Cloudike, set in your own gradle.properties):
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://rt.cloudike.com/artifactory/libs-release-local")
credentials {
username = settings.extra.properties["artifactory_username"].toString()
password = settings.extra.properties["artifactory_password"].toString()
}
}
}
}
Add core to your app module's build.gradle.kts and sync the project:
dependencies {
implementation("com.cloudike.sdk:core:<version>")
}
Supports Android API level 24 (Android 7.0) and above.
Initialization
import com.cloudike.sdk.core.CoreManager
val coreContext = CoreManager.build(applicationContext)
Builds the shared CoreContext — typically once, from Application.onCreate(). Every other Cloudike Android SDK requires this same CoreContext instance for its own initialization. It isn't authenticated yet — start a session on it before using it, or any dependent SDK built from it.
First API Call
import kotlinx.coroutines.runBlocking
runBlocking {
coreContext.sessionManager.start(
reset = false,
baseUrl = "https://your-backend.example.com/", // your Cloudike backend endpoint
accessToken = accessToken, // from your sign-in flow
userId = userId, // from your sign-in flow
userAgent = "YourApp/1.0",
)
}
println("Session active: ${coreContext.sessionManager.isSessionActive}")
Starts the user session with your own credentials. isSessionActive becomes true once the session is active — confirming Core SDK is ready for use by itself or by any dependent SDK. baseUrl/accessToken/userId/userAgent come from your own sign-in flow — the values shown are placeholders.