CMMotionActivity¶
Inherits: RefCounted < Object
A user-activity classification (walking, running, automotive, etc.) from the system motion coprocessor.
Description¶
Wraps Apple’s CMMotionActivity. More than one activity flag may be set simultaneously (e.g. walking and automotive when the user is moving inside a vehicle). The system uses confidence to indicate how certain the classification is.
See Apple’s CMMotionActivity reference.
Tutorials¶
Properties¶
Enumerations¶
enum Confidence: 🔗
Confidence LOW = 0
Low confidence in the classification.
Confidence MEDIUM = 1
Medium confidence in the classification.
Confidence HIGH = 2
High confidence in the classification.
Property Descriptions¶
true when the user appears to be in a vehicle.
Confidence confidence 🔗
void set_confidence(value: Confidence)
Confidence get_confidence()
How confident the system is in this classification.
true when the user appears to be cycling.
true when the user appears to be running.
Unix-time start of the period for which this activity applies, in seconds.
true when the user appears to be stationary.
true when the system cannot classify the user’s activity.
true when the user appears to be walking.