Class Info |
|---|
public class ActivityRecordInsertOptions Request parameter class for inserting an activity record, including the associated sample set and sampling points to the platform. |
Java
// Note that startTime and endTime respectively indicate the start time and end time of the activity record to be inserted. You can define them by yourself.
ActivityRecord activityRecord = new ActivityRecord.Builder()
.setName("AddActivityRecord")
.setDesc("This is ActivityRecord add test!")
.setId("MyAddActivityRecordId")
.setActivityTypeId(HiHealthActivities.RUNNING)
.setStartTime(startTime, TimeUnit.MILLISECONDS)
.setEndTime(endTime, TimeUnit.MILLISECONDS)
.build();
ActivityRecordInsertOptions insertOption = new ActivityRecordInsertOptions.Builder()
.setActivityRecord(activityRecord)
.build(); Kotlin
// Note that startTime and endTime respectively indicate the start time and end time of the activity record to be inserted. You can define them by yourself.
val activityRecord = ActivityRecord.Builder()
.setName("AddActivityRecord")
.setDesc("This is ActivityRecord add test!")
.setId("MyAddActivityRecordId")
.setActivityTypeId(HiHealthActivities.RUNNING)
.setStartTime(startTime, TimeUnit.MILLISECONDS)
.setEndTime(endTime, TimeUnit.MILLISECONDS)
.build()
val insertRequest = ActivityRecordInsertOptions.Builder().setActivityRecord(activityRecord).build() Qualifier and Type | Class Name and Description |
|---|---|
public static class | ActivityRecordInsertOptions.Builder Builder for ActivityRecordInsertOptions. |
Qualifier and Type | Method Name and Description |
|---|---|
| Obtains the activity record to be inserted. | |
List<SampleSet> | Obtains the sample sets to be inserted. |
Method |
|---|
public ActivityRecord getActivityRecord() Obtains the activity record to be inserted. |
Returns
Type | Description |
|---|---|
Activity record to be inserted. |