// Create a data set
DataSet dataSetDistance = DataSet.create(dataSourceDistance);
// For each data point, specify a start time, end time, and the data value -- in this case,
// the number of new steps.
DataPoint dataPointDistance = dataSetDistance.createDataPoint()
.setTimeInterval(startTime, endTime, TimeUnit.MILLISECONDS);
dataPointDistance.getValue(Field.FIELD_DISTANCE).setFloat(distanceInMeters);
dataSetDistance.add(dataPointDistance);
I get error as There was a problem inserting the dataset.
DataSource dataSourceDistance = new DataSource.Builder() .setAppPackageName(this) .setDataType(DataType.TYPE_DISTANCE_DELTA) .setName(TAG + " - distance") .setType(DataSource.TYPE_DERIVED) .build();
I get error as There was a problem inserting the dataset.