Session & Data Saving
Control session saving and data upload behavior. Applies to: any flow ending on the statistics screen (Workout player and Challenge completions).
| Parameter | Type | Default | Applies to | What it does internally |
| shouldSendStats | boolean | false (true for AI Trainer) | Workout player | When enabled, the completed session is automatically saved to the KinesteX backend — per-exercise stats, accuracy scores, calories, and the motion recording (used for session replay). Saved sessions are retrievable via the Workout Sessions API. For AI Trainer launches the default is true so the chat can show the completed-workout card |
Messages posted to the host during saving:
workout_session_saved— the session document was stored (includes the session ID and scores)motion_upload_progress— motion-recording upload progresssession_save_complete— everything (session + motion data) finished uploadingmotion_upload_error— the motion upload failed or timed out
Offline behavior: if saving fails (e.g. no connectivity), the result is queued locally and retried automatically when the connection returns or on the next launch. A successful retry sends workout_session_saved (and plan_progression_saved for plan workouts) only, without the motion-upload messages.
Note: independent of this flag, the statistics screen always posts the workout_overview / exercise_overview summary messages to the host. shouldSendStats only controls backend persistence. If motionDataEnabled: false was passed, the saved session will have no replay data.
1// Via customParams
2kinestex.createWorkoutView(
3 workout: "Full Body Burn",
4 customParams: [
5 "shouldSendStats": true
6 ]
7)