Class Info |
|---|
public class ActivityIdentificationData implements Parcelable Identified activity type. |
Qualifier and Type | Field and Description |
|---|---|
static final Creator<ActivityIdentificationData> | Used for deserializing ActivityIdentificationData. |
static final int | The device is on a bicycle. |
static final int | The device user is walking or running. |
static final int | The current activity cannot be identified. |
static final int | The device user is running. This is a sub activity of the FOOT activity. |
static final int | The device is still. |
static final int | The device is in a vehicle, such as a car. |
static final int | The device user is walking. This is a sub activity of the FOOT activity. |
Constructor Name |
|---|
ActivityIdentificationData(int identificationActivity, int possibility) Builder of ActivityIdentificationData. |
Qualifier and Type | Method Name and Description |
|---|---|
int | Obtains the identified activity type. |
int | Obtains the confidence for a user to execute an activity. The value range is [0, 100]. |
static boolean | isValidType(int type) Checks whether the identified activity type is valid. |
void | setIdentificationActivity(int identificationActivity) Sets the activity type. |
void | setPossibility(int possibility) Sets the confidence for a user to execute an activity. The value range is [0, 100]. |
Fields |
|---|
public static final Creator<ActivityIdentificationData> CREATOR Used for deserializing ActivityIdentificationData. |
Fields |
|---|
public static final int BIKE The device is on a bicycle. BIKE: 101 For details about other constant values, please refer to Constant Values. |
Fields |
|---|
public static final int FOOT The device user is walking or running. FOOT: 102 For details about other constant values, please refer to Constant Values. |
Fields |
|---|
public static final int OTHERS The current activity cannot be identified. OTHERS: 104 For details about other constant values, please refer to Constant Values. |
Fields |
|---|
public static final int RUNNING The device user is running. This is a sub activity of the FOOT activity. RUNNING: 108 For details about other constant values, please refer to Constant Values. |
Fields |
|---|
public static final int STILL The device is still. STILL: 103 For details about other constant values, please refer to Constant Values. |
Fields |
|---|
public static final int VEHICLE The device is in a vehicle, such as a car. VEHICLE: 100 For details about other constant values, please refer to Constant Values. |
Fields |
|---|
public static final int WALKING The device user is walking. This is a sub activity of the FOOT activity. WALKING: 107 For details about other constant values, please refer to Constant Values. |
Constructor |
|---|
public ActivityIdentificationData(int identificationActivity, int possibility) Builder of ActivityIdentificationData. If the value of possibility is not within the range [0, 100], an error indicating invalid parameter will be thrown. |
Parameters
Name | Description |
|---|---|
identificationActivity | Detected activity type. For details, please refer to Constant Values. |
possibility | Confidence. The value range is [0, 100]. |
Throws
Name | Description |
|---|---|
ApiException | If the value of possibility is not within the range [0, 100]. |
Method |
|---|
public int getIdentificationActivity() Obtains the identified activity type. |
Returns
Type | Description |
|---|---|
int | Activity type. For details, please refer to Constant Values. |
Method |
|---|
public int getPossibility() Obtains the confidence for a user to execute an activity. The value range is [0, 100]. A larger value indicates more reliable activity authenticity. |
Returns
Type | Description |
|---|---|
int | Confidence. |
Method |
|---|
public static boolean isValidType(int type) Checks whether the identified activity type is valid. |
Parameters
Name | Description |
|---|---|
type | Activity type. For details, please refer to Constant Values. |
Returns
Type | Description |
|---|---|
boolean | true if the activity type is valid; false otherwise. |
Method |
|---|
public void setIdentificationActivity(int identificationActivity) Sets the activity type. |
Parameters
Name | Description |
|---|---|
identificationActivity | Activity type. For details, please refer to Constant Values. |
Method |
|---|
public void setPossibility(int possibility) Sets the confidence for a user to execute an activity. The value range is [0, 100]. |
Parameters
Name | Description |
|---|---|
possibility | Confidence. The value range is [0, 100]. |
Throws
Name | Description |
|---|---|
ApiException | If the value of possibility is not within the range [0, 100]. |