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.

Public Constructor Summary

Constructor name
BehaviorStatus(List<DetectedBehavior> probableBehavior, long time, long elapsedRealtimeMillis)
Constructs a BehaviorStatus object.

Public Method Summary

Return typeMethod name
intgetBehaviorConfidence(int type)
longgetElapsedRealtimeMillis()
DetectedBehaviorgetMostLikelyBehavior()
List<DetectedBehavior>getProbableBehavior()
longgetTime()

Public Constructors

constructor
public BehaviorStatus(List<DetectedBehavior> probableBehavior, long time, long elapsedRealtimeMillis)
Constructs a BehaviorStatus object.

Parameters

Parameter nameParameter desc
probableBehaviorDetected behaviors, which are sorted by confidence (most probable first).
timeTimestamp of the current detection.
elapsedRealtimeMillisActual time (in milliseconds) used for this detection since startup.

Public Methods

Method
public int getBehaviorConfidence (int type)
Obtains the confidence of a given behavior type.

Parameters

Parameter nameParameter desc
typeBehavior type.


Return

Typedesc
intConfidence, 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

Typedesc
longActual time (in milliseconds) used for this detection since startup.
Method
public DetectedBehavior getMostLikelyBehavior()
Obtains the most likely behavior being executed by the user.

Return

Typedesc
DetectedBehaviorMost 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

Typedesc
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

Typedesc
longDetection time, in timestamp format.