Data Points

PostMessage events sent from KinesteX SDK for integration with native apps and external systems. Events are sent in real-time, work safely offline, and provide comprehensive tracking for workouts, exercises, and health assessments.

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

Application Lifecycle

Events for app startup, loading, and exit.


EventData FieldsDescription
kinestex_launcheddata: string ("dd mm yyyy hh:mm:ss")KinesteX application is launched
kinestex_loadeddate: string (ISO format)KinesteX fully loaded and ready
exit_kinestexdate: Date, time_spent: string ("hh:mm:ss")User exits with total time spent
main_page_openeddate: string (ISO format)Main/home page is opened

Workout Events

Events for workout lifecycle and statistics.


EventData FieldsDescription
workout_openedtitle: string, id: string, date: stringWorkout details page opened
workout_startedid: string, date: stringWorkout session started
workout_started (alt)workoutId: stringAlternative workout start format
workout_completedworkout: string, date: stringWorkout finished, user exits overview
workout_overviewdata: objectComplete workout summary statistics

workout_overview Data Structure:

```

{

workout_title: string, // Workout name

workout_id: string, // Unique workout ID

target_duration_seconds: number, // Target workout duration

completed_reps_count: number, // Total completed reps

target_reps_count: number, // Total target reps

calories_burned: number, // Calories (2 decimal places)

completion_percentage: number, // Completion % (2 decimals)

total_mistakes: number, // Total mistake count

accuracy_score: number, // Overall accuracy (0-100)

efficiency_score: number, // Efficiency metric (0-100)

total_exercise: number, // Number of exercises

actual_hold_time_seconds: number, // Time in correct position

target_hold_time_seconds: number // Target hold time

}

```

Handling Workout Overview
1case .workout_overview(let data):
2    if let calories = data["calories_burned"] as? Double,
3       let completion = data["completion_percentage"] as? Double {
4        print("Burned \(calories) cal, \(completion)% complete")
5    }

Exercise Events

Events for individual exercise tracking.


EventDescription
exercise_completedIndividual exercise completed
exercise_overviewAll exercises summary (array)

exercise_completed Data Structure:

```

{

exercise_title: string, // Exercise name

time_spent: number, // Seconds spent

repeats: number, // Reps completed

total_reps: number, // Required reps

total_duration: number, // Countdown time

calories: number, // Calories burned

exercise_id: string, // Exercise ID

mistakes: Array<{ // Mistakes made

mistake: string,

count: number

}>,

average_accuracy?: number // Average accuracy (0-1, optional)

}

```


exercise_overview Item Structure:

```

{

exercise_title: string, // Exercise name

exercise_id: string, // Unique exercise ID

time_spent: number, // Time on exercise (seconds)

perfect_hold_position: number, // Time in correct position (timer-based)

repeats: number, // Reps completed

total_required_reps: number, // Target reps

total_required_time: number, // Target time (seconds)

calories: number, // Calories (2 decimal places)

mistakes: Array<{ // Detailed mistake breakdown

mistake: string,

count: number

}>,

mistake_count: number, // Total mistakes for exercise

accuracy_reps?: number[], // Per-rep accuracy scores (optional)

average_accuracy?: number // Average accuracy 0-100 (optional)

}

```

Camera & Frame Events

Events for camera tracking and frame detection.


EventData FieldsDescription
left_camera_framedate: string ("dd mm yyyy hh:mm:ss")User left camera view
returned_camera_framedate: string ("dd mm yyyy hh:mm:ss")User returned to camera view
check_frame_completedmessage: string ("Person stepped into frame")Frame check completed
camera_selector_openedmessage: array (available cameras)Camera selector opened
camera_selectedid: string, label: string, isMirrorCamera: booleanCamera selected by user

Plans & Programs

Events for workout plans and programs.


EventData FieldsDescription
plan_unlockedid: string, img: string, title: string, date: stringPlan unlocked/selected
personalized_plan_exitworkout: string, date: stringExit from personalized plan

Challenge Events

Events for challenge mode.


EventData FieldsDescription
challenge_startedexerciseId: stringChallenge exercise started
challenge_completedrepCount: number, mistakes: numberChallenge completed
challenge_exitworkout: string, date: stringExit from challenge

Leaderboard Events

Events for leaderboard functionality.


EventData FieldsDescription
highlighted_userdata: objectUser's leaderboard position

highlighted_user Data Structure:

```

{

username: string, // User's username

score: number, // User's score

position: number // Leaderboard position (1-based)

}

```

Error & Status Events

Events for errors, warnings, and active time tracking.


EventData FieldsDescription
error_occurreddata: stringGeneral error message
error_occurredmessage: stringAlternative error format
error_occurreddata: string, error: anyError with details
warningdata: stringWarning message
total_active_secondsnumberActive workout time (sent every 5s, pauses when user leaves camera frame)

Assessment Overview

AI-powered health assessments with two event types:

  • assessment_overview: Sent when results page loads
  • assessment_completed: Sent when user clicks restart or finish

Common Fields (All Assessments):

FieldTypeDescription
typestring"assessment_overview" or "assessment_completed"
assessmentTypestringAssessment identifier (e.g., "tug", "sls")
dateDateTimestamp when completed
timenumberTotal assessment time (seconds)
stepsnumber?Estimated step count (walking assessments)

Assessment Types:

  • Mobility: TUG (tug), Gait Speed Test (gaitspeedtest)
  • Balance: SLS (sls), SBSS (sbss), STSS (stss), Full Tandem (fulltandem)
  • Functional: STS (sts), Five Times STS (fivetimessts), FRT (frt)
  • Games: Balloon Pop (balloonpop), Color Chase (colorchase), Alien Squat Shooter (aliensquatshooter)

Risk Levels:

ValueMeaning
lowGood performance, minimal fall/balance risk
moderateSome limitations, may benefit from training
highSignificant limitations, balance training recommended

Mobility Assessments

TUG (Timed Up and Go) - assessmentType: "tug"


Stand-walk-turn-return-sit timing test.


FieldTypeDescription
timenumberTotal completion time (seconds)
stepsnumberEstimated step count
standingUpTimenumberTime to stand from seated (seconds)
sittingDownTimenumberTime to sit at end (seconds)
walkingForwardTimenumberTime walking to 3m marker (seconds)
walkingBackwardTimenumberTime walking back (seconds)
turningTimenumberTime spent turning (seconds)
backBendingAngleSittingnumber[]Back angles during sitting countdown (degrees)
backBendingAngleStandingnumber[]Back angles during movement (degrees)
averageSpeedMs_tugnumberAverage walking speed. Formula: 6m / time
avgBackBendingSittingnumber?Average back angle sitting (degrees)
avgBackBendingStandingnumber?Average back angle standing (degrees)

---


Gait Speed Test - assessmentType: "gaitspeedtest"


Walking speed measurement over 4 meters.


FieldTypeDescription
timenumberTotal test time (seconds)
stepsnumberEstimated step count
standingTimenumberTime in standing phase (seconds)
walkingTimenumberActive walking time (seconds)
averageGaitSpeednumberGait speed. Formula: 4m / time

Balance Assessments

SLS (Single Leg Stand) - assessmentType: "sls"


FieldTypeDescription
rightTimenumberDuration on right leg (seconds)
leftTimenumberDuration on left leg (seconds)
symmetryScore_slsnumber?Leg symmetry % (0-100). Formula: (min/max) * 100
riskLevel_slsstring"low", "moderate", or "high"

Risk Calculation:

  • Low: Min time >=20s AND symmetry good (difference <=5s)
  • Moderate: Min time >=10s AND average >=15s
  • High: All other cases

---


SBSS (Side-by-Side Stand) - assessmentType: "sbss"


FieldTypeDescription
timeInProperPosition_sbssnumberTime in correct stance (max 10s)
maxShoulderShift_sbssnumberMax lateral shoulder shift (% of shoulder width)
maxHipShift_sbssnumberMax lateral hip shift (% of hip width)
feetMoved_sbssbooleanWhether feet moved
riskLevel_sbssstring"low", "moderate", or "high"

Risk Calculation:

  • High: Feet moved OR (time <7s AND sway >=30%)
  • Moderate: Time >=7s AND sway <30%
  • Low: Time >=9.5s AND sway <15%

---


STSS (Semi-Tandem Stand) - assessmentType: "stss"


FieldTypeDescription
timeInProperPosition_stssnumberTime in correct stance (max 10s)
maxShoulderShift_stssnumberMax shoulder shift (% of width)
maxHipShift_stssnumberMax hip shift (% of projection)
feetMoved_stssbooleanWhether feet moved
riskLevel_stssstring"low", "moderate", or "high"

Risk calculation same as SBSS.


---


Full Tandem Stand - assessmentType: "fulltandem"


FieldTypeDescription
timenumberTotal test time (seconds)
timeInProperPosition_fulltandemnumberTime in heel-to-toe stance (max 10s)
maxShoulderShift_fulltandemnumberMax shoulder shift (%)
maxHipShift_fulltandemnumberMax hip shift (%)
feetMoved_fulltandembooleanWhether feet moved
testFailed_fulltandembooleanWhether test was terminated early
terminationReason_fulltandemstring?Reason for early termination
riskLevel_fulltandemstring"low", "moderate", or "high"

Risk Calculation:

  • Low: Time >=10s AND no feet movement
  • Moderate: Time >=5s
  • High: Time <5s

Functional Assessments

STS (30-Second Sit-to-Stand) - assessmentType: "sts"


FieldTypeDescription
repsnumberTotal reps completed in 30 seconds
averageSittingTimenumberAverage time sitting per rep (seconds)
averageStandingTimenumberAverage time standing per rep (seconds)
avgTimePerRep_stsnumber?Average seconds per rep. Formula: 30 / reps
repTimeVariance_minRepTimenumber?Fastest rep time (seconds)
repTimeVariance_maxRepTimenumber?Slowest rep time (seconds)
repTimeVariance_minRepIndexnumber?Which rep was fastest (1-indexed)
repTimeVariance_maxRepIndexnumber?Which rep was slowest (1-indexed)

---


Five Times STS - assessmentType: "fivetimessts"


FieldTypeDescription
timenumberTotal completion time for 5 reps (seconds)
averageSittingTimenumberAverage time sitting (seconds)
averageStandingTimenumberAverage time standing (seconds)

---


FRT (Functional Reach Test) - assessmentType: "frt"


FieldTypeDescription
reachnumberMaximum forward reach (cm)
maxHeelLiftnumberMaximum heel lift detected (cm)
heelLiftCountnumberCount of heel lift violations
legLiftCountnumberCount of leg lift violations
testCompletedbooleanWhether test finished normally
endReasonstring?Reason for early termination
riskLevel_frtstring?"low", "moderate", or "high"

End Reason Values:

  • "Feet moved out of zone"
  • "User left zone"
  • "User turned forward"
  • "Arm dropped completely"
  • "Reference lost"
  • "Unhandled state"

Risk Calculation:

  • High: Test not completed OR reach <=15cm
  • Moderate: Reach 15-25cm
  • Low: Reach >25cm

Game Assessments

Balloon Pop - assessmentType: "balloonpop"


FieldTypeDescription
gameScorenumberTotal balloons popped
averageReactionTimestringAverage time to pop (seconds)
maxIdleTimestringMax time without action (seconds)
averageSpeed_balloonpopnumberBalloons/second. Formula: gameScore / 30
masteryTitle_balloonpopstringAchievement tier

Mastery Titles:

ScoreTitle
>=30pop_tastic_hero
>=25magic_popper
>=20super_duper_popper
>=15sparkly_popper
>=10giggly_popper
>=5bouncy_bubbler
<5tiny_popper

---


Color Chase - assessmentType: "colorchase"


FieldTypeDescription
gameScorenumberTotal score achieved
levelReachednumberHighest level completed
totalDurationstringTotal game duration (seconds)
averageReactionTimestringAverage reaction time per tap (seconds)
maxIdleTimestringMax time between taps (seconds)
masteryTitle_colorchasestringAchievement tier

Mastery Titles:

LevelTitle
>=10color_chase_legend
>=8magic_color_wizard
>=6super_color_star
>=4shiny_sequencer
>=2rainbow_chaser
>=1color_buddy
<1little_color_finder

---


Alien Squat Shooter - assessmentType: "aliensquatshooter"


FieldTypeDescription
gameScorenumberTotal aliens destroyed
squatsPerformednumberNumber of squats completed
totalDurationstringTotal game duration (seconds)
averageSquatRatestringSquats per second
maxTimeBetweenSquatsstringMax idle between squats (seconds)
averageAlienDestroyTimestringAverage time to destroy alien (seconds)
masteryTitle_aliensquatshooterstringAchievement tier

Mastery Titles:

ScoreTitle
>=25alien_annihilator
>=20cosmic_blaster
>=15star_shooter
>=10galactic_gunner
>=5space_squatter
<5rookie_defender

---


Health Benefits (All Games)


Included in payload for all game types.


```

healthBenefits: {

heartDiseaseReduction: number, // Estimated % reduction (max 15)

diabetesReduction: number, // Estimated % reduction (max 20)

obesityReduction: number, // Estimated % reduction (max 10)

depressionReduction: number // Estimated % reduction (max 15)

}

```


Health Benefit Calculation:

`reduction = min((gameScore / 100) * maxReduction, maxReduction)`

Event Flow Examples

Complete Workout Flow:

1. `kinestex_launched` - Application starts

2. `workout_opened` - User views workout details

3. `workout_started` - Workout begins

4. `returned_camera_frame` / `left_camera_frame` - Frame tracking

5. Multiple `exercise_completed` - Each exercise finished

6. `workout_overview` - Summary statistics

7. `exercise_overview` - All exercises summary

8. `workout_completed` - User exits statistics

9. `exit_kinestex` - Application closed


Challenge Flow:

1. `challenge_started` - Challenge begins

2. `exercise_completed` - Exercise finished

3. `challenge_completed` - Challenge complete

4. `challenge_exit` - Exit from challenge


Assessment Flow:

1. `kinestex_launched` - Application starts

2. Assessment performed (user follows on-screen instructions)

3. `assessment_overview` - Results page loads with all metrics

4. `assessment_completed` - User clicks restart or finish

5. `exit_kinestex` - Application closed

Need Help?

Our team is ready to assist with your integration.

Contact Support
KinesteX

Personal AI Fitness Trainer & Motion Analysis SDK for Health & Fitness Apps

Contacts

hello@kinestex.com

Supported by

AMKM Investments supporting KinesteXin5 Tech
© 2024. All rights reserved. KinesteX
KinesteX TwitterKinesteX Inst