KinesteX

Receiving Data

Each platform has a specific pattern for receiving data from KinesteX.


SDK Platforms (Swift, Kotlin, React Native, React-TS, Flutter): Use the callback function provided by the SDK with typed message enums.


HTML/JS: Set up a message event listener manually since there's no SDK wrapper.

Platform-Specific Data Handlers
1// onMessageReceived callback passes WebViewMessage enum
2// Available message types:
3
4// kinestex_launched([String: Any]) - KinesteX View launched
5// finished_workout([String: Any]) - Workout completed
6// error_occurred([String: Any]) - Errors (e.g., missing camera)
7// exercise_completed([String: Any]) - Exercise finished
8// exit_kinestex([String: Any]) - User exits KinesteX view
9// workout_opened([String: Any]) - Workout description viewed
10// workout_started([String: Any]) - Workout begins
11// plan_unlocked([String: Any]) - Workout plan unlocked
12// custom_type([String: Any]) - Unrecognized messages
13// reps([String: Any]) - Successful repetitions
14// mistake([String: Any]) - Detected mistakes
15// left_camera_frame([String: Any]) - User left camera frame
16// returned_camera_frame([String: Any]) - User returned to frame
17// workout_overview([String: Any]) - Workout summary
18// exercise_overview([String: Any]) - Exercise summary
19// workout_completed([String: Any]) - Workout done, overview exited