Class Info |
|---|
public class ActivityRecordDeleteOptions Parameter class for deleting activity records from Health Kit. An activity record includes activityRecordIds, activity start and end times, and subDataTypeList. |
Java // For details about subDataTypeList, startTime, endTime, and activityRecordIds, see the code for deleting activity records. ActivityRecordDeleteOptions deleteRequest = new ActivityRecordDeleteOptions.Builder() .setSubDataTypeList(subDataTypeList) .setTimeInterval(startTime, endTime, TimeUnit.MILLISECONDS) .setActivityRecordIds(activityRecordIds) .build();
Kotlin // For details about subDataTypeList, startTime, endTime, and activityRecordIds, see the code for deleting activity records. val deleteRequest = ActivityRecordDeleteOptions.Builder() .setSubDataTypeList(subDataTypeList) .setTimeInterval(startTime, endTime, TimeUnit.MILLISECONDS) .setActivityRecordIds(activityRecordIds) .build()
Qualifier and Type | Class Name and Description |
|---|---|
public static class | ActivityRecordDeleteOptions.Builder Builder for ActivityRecordDeleteOptions. |
Qualifier and Type | Method Name and Description |
|---|---|
List<DataType> | Obtains the types of detailed data to be deleted. |
long | getStartTime(TimeUnit timeUnit) Obtains the start time of the record to be deleted. |
long | getEndTime(TimeUnit timeUnit) Obtains the end time of the record to be deleted. |
List<String> | Obtains the IDs of activity records to be deleted. |
Method |
|---|
public List<DataType> getSubDataTypeList() Obtains the types of detailed data to be deleted. |
Returns
Type | Description |
|---|---|
List<DataType> | Types of detailed data to be deleted. |
Method |
|---|
public long getStartTime(TimeUnit timeUnit) Obtains the start time of the record to be deleted. |
Returns
Type | Description |
|---|---|
long | Start time of the record to be deleted. |