Releases: KinesteX/KinesteX-SDK-Kotlin
Release list
2.0.7
2.0.2
v2.0.1
You can customize the appearance of the KinesteX SDK views using the IStyle data class. This allows you to match the SDK's look and feel with your app's branding.
Available Properties
| Property | Type | Default | Description |
|---|---|---|---|
| style | String? | "dark" | Base theme style |
| themeName | String? | null | Custom theme name |
| loadingStickmanColor | String? | null | Color for the loading animation stickman |
| loadingBackgroundColor | String? | null | Background color during loading |
| loadingTextColor | String? | null | Text color during loading |
Example Usage
KinesteXSDK.createWorkoutView(
context = this,
workoutName = "Fitness Lite",
style = IStyle(
style = "dark",
loadingBackgroundColor = "000000", // hex value of color without #
loadingStickmanColor = "e94560",
loadingTextColor = "ffffff"
),
isLoading = viewModel.isLoading,
onMessageReceived = { message ->
handleWebViewMessage(message)
},
permissionHandler = this
)
Note: The style parameter is available on all view creation methods (createMainView, createPlanView, createWorkoutView, createChallengeView, createExperiencesView, createCameraComponent, etc.).
---
Native Loading Overlay
The SDK includes a native overlay that covers the WebView until the KinesteX content is fully loaded. This provides a seamless loading experience and prevents users from seeing a blank or partially loaded screen.
How It Works
1. When a view is created, a native overlay is displayed on top of the WebView
2. The overlay automatically hides when the KinestexLoaded message is received
3. The overlay color is determined by your IStyle configuration
Overlay Color Priority
The overlay color is determined in the following order:
┌──────────┬───────────────────────────────┬──────────────────────────────┐
│ Priority │ Condition │ Overlay Color │
├──────────┼───────────────────────────────┼──────────────────────────────┤
│ 1st │ loadingBackgroundColor is set │ Uses the specified hex color │
├──────────┼───────────────────────────────┼──────────────────────────────┤
│ 2nd │ style = "light" │ White (#FFFFFF) │ ...
🎉 v2.0 Now Available!
The latest version introduces a modern initialization pattern with better performance and developer experience.
See Migration Guide →
What's New:
✅ Initialize once, use everywhere - no more credential repetition
✅ WebView warmup for faster first load
✅ Memory leak prevention with proper lifecycle management
✅ Enhanced API client with automatic header injection
KinesteX SDK v 1.2.1
Added leaderboard integration option.
View more here: https://github.com/KinesteX/KinesteX-SDK-Kotlin/blob/main/docs/integration/plug-and-play/leaderboard.md
KinesteX SDK v 1.2.0
KinesteX SDK v1.1.9
Upaded WorkoutSummary for each WeekDetail in Plan with:
val imgURL: String,
val calories: Double?,
val total_minutes: Int?
KinesteX SDK v1.1.8
Added filtering by category and body_parts
KinesteX SDK v1.1.7
KinesteX SDK v 1.1.6
Moved camera permission logic completely to app lifecycle for easier permission handling across different setups.
Usage:
- Update the dependency to 1.1.6:
implementation "com.github.KinesteX:KinesteX-SDK-Kotlin:1.1.6"
2.1 Make sure your activity or fragment implements the PermissionHandler interface:
class MainActivity : AppCompatActivity(), PermissionHandler
2.2 Create necessary variables and override the requestCameraPermission method in PermissionHandler interface:
private var kinesteXWebView: GenericWebView? = null
private val requestPermissionLauncher = registerForActivityResult(
ActivityResultContracts.RequestPermission()
) { isGranted: Boolean ->
kinestexWebView?.handlePermissionResult(isGranted)
}
override fun requestCameraPermission() {
requestPermissionLauncher.launch(Manifest.permission.CAMERA)
}- Pass permissionHandler to the SDK on function initialization:
kinesteXWebView = KinesteXSDK.createMainView(
this,
apiKey,
company,
userId,
getPlanCategory(subOption),
null,
customParams = data, // example of using custom parameters. CAN BE NULL
viewModel.isLoading,
::handleWebViewMessage,
permissionHandler = this // pass the activity or if fragment: this@YourFragment
) as GenericWebView?