| class info |
| public class BehaviorStatus implements Parcelable |
| Behavior recognition result. |
| The result contains a list of behaviors of a user at a specific time. The behaviors in the list are sorted by possibility. Each possible behavior has confidence, which indicates how likely a user is executing the behavior. |
| The getMostLikelyBehavior method in the class returns the most likely behavior of the user. |
| Constructor name |
| BehaviorStatus(List<DetectedBehavior> probableBehavior, long time, long elapsedRealtimeMillis) |
| Constructs a BehaviorStatus object. |
| Return type | Method name |
| int | getBehaviorConfidence(int type) |
| long | getElapsedRealtimeMillis() |
| DetectedBehavior | getMostLikelyBehavior() |
| List<DetectedBehavior> | getProbableBehavior() |
| long | getTime() |
| constructor |
| public BehaviorStatus(List<DetectedBehavior> probableBehavior, long time, long elapsedRealtimeMillis) |
| Constructs a BehaviorStatus object. |
Parameters
| Parameter name | Parameter desc |
| probableBehavior | Detected behaviors, which are sorted by confidence (most probable first). |
| time | Timestamp of the current detection. |
| elapsedRealtimeMillis | Actual time (in milliseconds) used for this detection since startup. |
| Method |
| public int getBehaviorConfidence (int type) |
| Obtains the confidence of a given behavior type. |
Parameters
| Parameter name | Parameter desc |
| type | Behavior type. |
Return
| Type | desc |
| int | Confidence, indicating the possibility that a user is executing the behavior. The value ranges from 0 to 100. |
| Method |
| public long getElapsedRealtimeMillis() |
| Obtains the actual time (in milliseconds) used for this detection since startup. |
Return
| Type | desc |
| long | Actual time (in milliseconds) used for this detection since startup. |
| Method |
| public DetectedBehavior getMostLikelyBehavior() |
| Obtains the most likely behavior being executed by the user. |
Return
| Type | desc |
| DetectedBehavior | Most likely behavior. |
| Method |
| public List<DetectedBehavior> getProbableBehavior() |
| Obtains a list of behaviors of a user at a specific time. The behaviors in the list are sorted by possibility. Each possible behavior has confidence, which indicates how likely a user is executing the behavior. |
| Some behaviors are not mutually exclusive (for example, you can walk on a bus) and some behaviors are hierarchical (for example, ON_FOOT is generalized from WALKING and RUNNING), so the sum of the confidence of all detected classified behaviors does not need to be less than or equal to 100. |
Return
| Type | desc |
| List<DetectedBehavior> | Obtains a list of behaviors of a user at a specific time. The behaviors in the list are sorted by possibility. |
| Method |
| public long getTime() |
| Obtains the detection time, in timestamp format. |
Return
| Type | desc |
| long | Detection time, in timestamp format. |