| CLASS info |
| public class ActivityIdentificationResponse implements Parcelable, IMessageEntity |
| Activity identification result. |
| Name | Desc | |
| Creator<ActivityIdentificationResponse> | CREATOR | Deserializes the activity identification result. |
| Constructor name |
| ActivityIdentificationResponse(List<ActivityIdentificationData> activityIdentificationDatas, long time, long elapsedTimeFromReboot) Builds a ActivityIdentificationResponse |
| ActivityIdentificationResponse(ActivityIdentificationData mostActivityIdentificationData, long time, long elapsedTimeFromReboot) Builds a ActivityIdentificationResponse |
| Return type | Method name |
| static ActivityIdentificationResponse | getDataFromIntent(Intent intent) |
| int | getActivityPossibility(int activityType) |
| long | getElapsedTimeFromReboot() |
| ActivityIdentificationData | getMostActivityIdentification() |
| List<ActivityIdentificationData> | getActivityIdentificationDatas() |
| long | getTime() |
| static boolean | containDataFromIntent(Intent intent) |
| constructor |
| public ActivityIdentificationResponse (List<ActivityIdentificationData> activityIdentificationDatas, long time, long elapsedTimeFromReboot) |
| Builds a ActivityIdentificationResponse |
Parameters
| Parameter name | Parameter desc |
| activityIdentificationDatas | List of all activitiy identifications in the period. The activitiy identifications are sorted by confidence. |
| time | Identification time. The value is the number of seconds elapsed since 00:00:00 of January 1, 1970. |
| elapsedTimeFromReboot | Identification time. Number of nanoseconds since boot. |
| constructor |
| public ActivityIdentificationResponse(ActivityIdentificationData mostActivityIdentificationData, long time, long elapsedTimeFromReboot) |
| Builds a ActivityIdentificationResponse |
Parameters
| Parameter name | Parameter desc |
| mostActivityIdentificationData | Most possible activity identification in the period. |
| time | Identification time. The value is the number of seconds elapsed since 00:00:00 of January 1, 1970. |
| elapsedTimeFromReboot | Identification time. Number of nanoseconds since boot. |
Parameters
| Parameter name | Parameter desc |
| intent | The intent was sent from the activity identification service. |
Return
| type | desc |
| ActivityIdentificationResponse | If the Intent does not contain ActivityIdentificationResponse, null is returned. |
| Method |
| public int getActivityConfidence(int activityType) |
| This API is used to obtain the confidence of an activity type. |
Parameters
| Parameter name | Parameter desc |
| activityType | Activity type. |
Return
| type | desc |
| int | Confidence |
Return
| type | desc |
| long | timestamp, in nanoseconds. |
| Method |
| public ActivityIdentificationData getMostActivityIdentification() |
| This API is used to obtain the most probable activity identification of the user. |
Return
| type | desc |
| ActivityIdentificationData | Activity Identification. |
| Method |
| public List<ActivityIdentificationData> getActivityIdentificationDatas() |
| This API is used to obtain the list of activitiy identification list. The activity identifications are sorted by most probable activity first. |
Return
| type | desc |
| List<ActivityIdentificationData> | activity identification list. |
| Method |
| public long getTime() |
| This API is used to obtain the time of this identification, which is in milliseconds since January 1, 1970,obtained by System.currentTimeMillis(). |
Return
| type | desc |
| long | timestamp, in milliseconds. |
Parameters
| Parameter name | Parameter desc |
| intent | The intent was sent from the activity identification service. |
Return
| type | desc |
| boolean | If the Intent contains ActivityIdentificationResponse, this parameter returns true. If the Intent is null or does not contain ActivityIdentificationResponse, this parameter returns false. |