public void setSensorSleepWindow(long millis) {
   try {
     sensorManager.setSensorConfig(
         sensorType, PullSensorConfig.POST_SENSE_SLEEP_LENGTH_MILLIS, millis);
   } catch (ESException e) {
     e.printStackTrace();
   }
 }
 public void setSensorSampleWindow(long millis) {
   try {
     sensorManager.setSensorConfig(
         sensorType, PullSensorConfig.SENSE_WINDOW_LENGTH_MILLIS, millis);
   } catch (ESException e) {
     e.printStackTrace();
   }
 }