Skip to content

[Bug/Feature Request]: IOS CMMotionActivity confidence ambiguity when multiple activity flags are true #1652

@ristiisa

Description

@ristiisa

Context

CMMotionActivity can report multiple boolean flags as true simultaneously, with a single confidence value for the overall detection. The plugin currently surfaces a single activity.type and activity.confidence, which works well for the common case where only one flag is active.

However, when multiple flags are active, useful context is lost. Since CoreMotion provides one confidence for the entire detection (not per-flag), the consumer has no way to know that additional flags were present.

Example

Car stopped at a red light. CoreMotion reports:

automotive = true
stationary = true
confidence = .high

The consumer receives a single type (whichever the SDK resolves to), but both flags together more accurately describe the situation: stationary inside a vehicle. A consumer watching for still to trigger stationary behavior would miss it entirely, even though CoreMotion detected it.

Other real-world cases

  • Car stopped at a red light: automotive=true, stationary=true — cannot distinguish parked from moving
  • Walking to a parked car: walking=true, automotive=true — context lost
  • Slowing down on a bike: cycling=true, stationary=true — context lost

Suggestion

Expose all active flags alongside the existing resolved type. The current type and confidence fields stay as-is for backward compatibility. An additional activities array would carry the full picture:

Multiple flags active:

{
  "type": "in_vehicle",
  "confidence": 100,
  "activities": ["in_vehicle", "still"]
}

Single flag active (no change):

{
  "type": "walking",
  "confidence": 100,
  "activities": ["walking"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions