Class Info |
|---|
public class ActivityRecord Activity record class, which records the basic information about an activity of the user. For example, for an outdoor running activity, information including the start time, end time, activity record name, ID, description, activity type (as defined in HiHealthActivities), and activity duration will be recorded. |
Qualifier and Type | Class Name and Description |
|---|---|
public static class | Builder for ActivityRecord. |
Qualifier and Type | Field and Description |
|---|---|
static final String | ActivityRecord object contained in additional information. CAUTION: This constant has been deprecated. |
static final String | General prefix of an activity record. CAUTION: This constant has been deprecated. |
Qualifier and Type | Method Name and Description |
|---|---|
Long | getActiveTime(TimeUnit timeUnit) Obtains the active time of the activity record based on the passed time unit. |
String | Obtains the activity type associated with the activity record. Returns unknown if no return value is set. |
| Obtains the activity summary. | |
String | Obtains the detailed URL of the app related to the activity record. |
String | Obtains the domain name related to the activity record. |
| Obtains the app information related to the activity record. | |
String | Obtains the version of the app that has added the activity record. |
String | getDesc() Obtains the description of the activity record. |
| Obtains the device information. | |
long | getDurationTime(TimeUnit timeUnit) Obtains the duration of the activity record based on the passed time unit. |
long | getEndTime(TimeUnit timeUnit) Obtains the end time of the activity record based on the passed time unit. |
String | getId() Obtains the ID of the activity record. |
String | Obtains the metadata of the activity record. |
static String | getMimeType(String type) Obtains the MIME type of the activity record that describes a particular activity. CAUTION: This method has been deprecated. |
String | getName() Obtains the name of the activity record. |
String | Obtains the package name of the app that has added the activity record. |
long | getStartTime(TimeUnit timeUnit) Obtains the start time of the activity record based on the passed time unit. |
String | Obtains the time zone. |
boolean | Indicates whether the activity record has durations. |
boolean | Indicates whether an activity record is in progress. |
Field |
|---|
public static final String EXTRA_ACTIVITY_RECORD ActivityRecord object contained in additional information. Constant value: vnd.huawei.hihealth.activityRecord CAUTION: This constant has been deprecated. |
Field |
|---|
public static final String MIME_TYPE_PREFIX General prefix of an activity record. Constant value: vnd.huawei.hihealth.mimeType/ CAUTION: This constant has been deprecated. |
Method |
|---|
public String getActivityType() Obtains the activity type associated with the activity record. Returns unknown if no return value is set. |
Returns
Type | Description |
|---|---|
String | Activity type associated with the activity record. |
Method |
|---|
public String getAppDetailsUrl() Obtains the detailed URL of the app related to the activity record. |
Returns
Type | Description |
|---|---|
String | Detailed URL of the app. |
Method |
|---|
public String getAppDomainName() Obtains the domain name of the app. |
Returns
Type | Description |
|---|---|
String | Domain name. |
Method |
|---|
public AppInfo getAppInfo() Obtains the app information related to the activity record. |
Returns
Type | Description |
|---|---|
App information. |
Method |
|---|
public String getAppVersion() Obtains the version of the app that has added the activity record. |
Returns
Type | Description |
|---|---|
String | App version. |
Method |
|---|
public String getDesc() Obtains the description of the activity record. |
Returns
Type | Description |
|---|---|
String | Description of the activity record. |
Method |
|---|
public DeviceInfo getDeviceInfo() Obtains the device information of the activity record. |
Returns
Type | Description |
|---|---|
Information about the device on which an activity record is generated. |
Method |
|---|
public long getDurationTime(TimeUnit timeUnit) Obtains the duration of the activity record based on the passed time unit. |
Parameters
Name | Description |
|---|---|
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
long | Activity duration. |
Method |
|---|
public long getEndTime(TimeUnit timeUnit) Obtains the end time of the activity record based on the passed time unit. |
Parameters
Name | Description |
|---|---|
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
long | End time. |
Method |
|---|
public String getId() Obtains the ID of the activity record. |
Returns
Type | Description |
|---|---|
String | ID of the activity record. |
Method |
|---|
public static String getMimeType(String type) Obtains the MIME type of the activity record that describes a particular activity. CAUTION: This method has been deprecated. |
Parameters
Name | Description |
|---|---|
type | Type. |
Returns
Type | Description |
|---|---|
String | MIME type of the activity record that describes a particular activity. |
Method |
|---|
public String getName() Obtains the name of the activity record. |
Returns
Type | Description |
|---|---|
String | Name of the activity record. |
Method |
|---|
public String getPackageName() Obtains the package name of the app that has added the activity record. |
Returns
Type | Description |
|---|---|
String | Package name of the app. |
Method |
|---|
public long getStartTime(TimeUnit timeUnit) Obtains the start time of the activity record based on the passed time unit. |
Parameters
Name | Description |
|---|---|
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
long | Start time. |
Method |
|---|
public ActivitySummary getActivitySummary() Obtains the activity summary. |
Returns
Type | Description |
|---|---|
Activity summary. |
Method |
|---|
public String getTimeZone() Obtains the time zone. |
Returns
Type | Description |
|---|---|
String | Time zone. |
Method |
|---|
public boolean hasDurationTime() Indicates whether the activity record has durations. |
Returns
Type | Description |
|---|---|
boolean | Whether the activity record has durations. |
Method |
|---|
public Long getActiveTime(TimeUnit timeUnit) Obtains the active time of the activity record based on the passed time unit. |
Parameters
Name | Description |
|---|---|
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
Long | Active time of an activity record. |