CMMotionActivity returns 所有活动为 0
CMMotionActivity returns with all activities 0
我正在通过 CMMotionActivity 获取活动,其中所有列出的活动都是 0。
2016-07-21 11:54:57.807 myApp[245:12899] activity = CMMotionActivity @ 2366.054214, {startDate,2016-07-21 10:54:57 +0000, confidence,0, unknown,0, stationary,0, walking,0, running,0, automotive,0, cycling,0}
这是什么意思?如果没有检测到 activity,为什么还要提供 activity?
根据the doc:
It is also possible for all of the properties to be set to false when the device is in motion but the movement does not correlate to walking, running, cycling or automotive travel.
所以这是真正的 "unknown" 状态,CMMotionActivityManager 不知道您在做什么。
CMMotionActivity中的unknown 属性在设备关闭时设置为true,这通常发生在您尝试查询历史数据时。
我正在通过 CMMotionActivity 获取活动,其中所有列出的活动都是 0。
2016-07-21 11:54:57.807 myApp[245:12899] activity = CMMotionActivity @ 2366.054214, {startDate,2016-07-21 10:54:57 +0000, confidence,0, unknown,0, stationary,0, walking,0, running,0, automotive,0, cycling,0}
这是什么意思?如果没有检测到 activity,为什么还要提供 activity?
根据the doc:
It is also possible for all of the properties to be set to false when the device is in motion but the movement does not correlate to walking, running, cycling or automotive travel.
所以这是真正的 "unknown" 状态,CMMotionActivityManager 不知道您在做什么。
CMMotionActivity中的unknown 属性在设备关闭时设置为true,这通常发生在您尝试查询历史数据时。