You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using the plugin to access motion activity data, and I’ve noticed a potential discrepancy between the plugin's reported activity type and the native CMMotionActivity class in iOS. According to the documentation for CMMotionActivity, the properties like stationary, walking, running, automotive, cycling, and unknown aren’t mutually exclusive. This means that multiple properties can be true at the same time, depending on the situation. Apple Documentation
Here’s an example of the CMMotionActivity class properties:
However, when using the plugin to get motion activity within the Location object, we currently receive a single activity type (e.g., still, walking, on_foot, running, on_bicycle, in_vehicle, unknown) along with the confidence level.
The Activity class in the plugin captures the motion type and confidence, but it does not expose the other potential activity states:
classActivity {
/// The reported device motion activity.lateString type;
/// Confidence of the reported device motion activity in %.lateint confidence;
Activity(dynamic activity) {
this.type = activity['type'];
this.confidence = activity['confidence'];
}
}
Context
For example, if the user was driving in a car and the car stopped at a red light, the update event associated with that change in motion would have both the automotive and stationary properties set to true. It’s also possible for all of the properties to be set to false when the device is in motion but the movement doesn’t correlate to walking, running, cycling, or automotive travel.
My Question:
Is it possible to access all properties of CMMotionActivity (e.g., stationary, walking, automotive, cycling, unknown) using this plugin?
Additionally, would it be possible to modify the plugin to return all the values (i.e., multiple properties of the CMMotionActivity object that could be true simultaneously), rather than just the single type value?
The text was updated successfully, but these errors were encountered:
Environment
Expected Behavior
Hello,
I’m using the plugin to access motion activity data, and I’ve noticed a potential discrepancy between the plugin's reported activity type and the native
CMMotionActivity
class in iOS. According to the documentation forCMMotionActivity
, the properties likestationary
,walking
,running
,automotive
,cycling
, andunknown
aren’t mutually exclusive. This means that multiple properties can betrue
at the same time, depending on the situation. Apple DocumentationHere’s an example of the
CMMotionActivity
class properties:Actual Behavior
However, when using the plugin to get motion activity within the
Location
object, we currently receive a single activity type (e.g.,still
,walking
,on_foot
,running
,on_bicycle
,in_vehicle
,unknown
) along with the confidence level.Steps to Reproduce
The
Activity
class in the plugin captures the motion type and confidence, but it does not expose the other potential activity states:Context
For example, if the user was driving in a car and the car stopped at a red light, the update event associated with that change in motion would have both the automotive and stationary properties set to true. It’s also possible for all of the properties to be set to false when the device is in motion but the movement doesn’t correlate to walking, running, cycling, or automotive travel.
My Question:
Is it possible to access all properties of
CMMotionActivity
(e.g.,stationary
,walking
,automotive
,cycling
,unknown
) using this plugin?Additionally, would it be possible to modify the plugin to return all the values (i.e., multiple properties of the
CMMotionActivity
object that could betrue
simultaneously), rather than just the singletype
value?The text was updated successfully, but these errors were encountered: