The leaderboard automatically adapts to your KinesteX UI and can be fully customized in the admin dashboard.
Whenever a new ranking is available, the leaderboard automatically refreshes to show the latest standings.
// OPTIONAL: Custom Parameters
val data = mutableMapOf<String, Any>()
data["style"] = 'light' // light or dark theme (customizable in admin dashboard)
data["isHideHeaderMain"] = true // hide back button in leaderboard
kinesteXWebView = KinesteXSDK.createLeaderboardView(
this, // context
apiKey, // apiKey
company, // company name
userId, // userId
"Squats", // name or ID of the exercise
username = "", // highlight username in leaderboard if known
data, // custom parameters or null
viewModel.isLoading,
::handleWebViewMessage,
permissionHandler = this
) as GenericWebView?