# Motion Tracking Settings

Control AI-powered motion tracking behavior.

| Parameter | Type | Default | Description | Effect |
|-----------|------|---------|-------------|--------|
| motionTrackingSettingOn | boolean | - | Show motion tracking toggle | Displays the AI tracking on/off setting |
| motionTrackingEnabled | boolean | - | Enable motion tracking | Session-level override for AI tracking (clears localStorage preference) |
| motionDataEnabled | boolean | true | Record per-frame motion data | When set to `false`, the SDK does NOT collect per-frame pose landmark data during the session. Session replay will be empty for affected sessions, but all other workout functionality is unaffected |

**Note:** When `motionTrackingEnabled` is explicitly set, it clears any saved user preference and uses the provided value for the session.

**`motionDataEnabled` — only use this if you know why it's necessary.** This flag exists for memory-constrained scenarios (e.g., long workouts with many unique exercise videos on older iOS devices where peak memory pressure can cause the WebView to crash). Disabling motion data reduces memory usage at the cost of losing session replay. The recorder state resets on every verification, so the flag does not leak across sessions. Default behavior is unchanged if you omit the parameter.

**Motion Tracking Settings**

_Swift (iOS)_
```swift
// Via customParams
kinestex.createView(
    customParams: [
        "motionTrackingSettingOn": true,
        "motionTrackingEnabled": true,
        "motionDataEnabled": false // Only set when memory-constrained
    ]
)
```

_Kotlin (Android)_
```kotlin
// Via customParams
KinesteXSDK.createView(
    customParams = mapOf(
        "motionTrackingSettingOn" to true,
        "motionTrackingEnabled" to true,
        "motionDataEnabled" to false // Only set when memory-constrained
    )
)
```

_React Native_
```jsx
// Via customParameters
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  customParameters: {
    motionTrackingSettingOn: true,
    motionTrackingEnabled: true,
    motionDataEnabled: false, // Only set when memory-constrained
  },
};
```

_Flutter_
```dart
// Via customParams
KinesteXAIFramework.createView(
  customParams: {
    "motionTrackingSettingOn": true,
    "motionTrackingEnabled": true,
    "motionDataEnabled": false, // Only set when memory-constrained
  },
);
```

_HTML / JavaScript_
```html
// Direct in postData object
const postData = {
  userId: "user-123",
  company: "YOUR_COMPANY",
  key: "YOUR_API_KEY",
  motionTrackingSettingOn: true,
  motionTrackingEnabled: true,
  motionDataEnabled: false, // Only set when memory-constrained
};
```

_React (TypeScript)_
```tsx
// Via customParameters
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  customParameters: {
    motionTrackingSettingOn: true,
    motionTrackingEnabled: true,
    motionDataEnabled: false, // Only set when memory-constrained
  },
};
```

---
Source: https://kinestex.com/docs/customization-parameters/motion-tracking-settings · Index: https://kinestex.com/llms.txt
