use of com.nightscout.core.upload.BaseUploader in project android-uploader by nightscout.
the class Uploader method upload.
private boolean upload(List<GlucoseDataSet> glucoseDataSets, List<MeterEntry> meterRecords, List<CalibrationEntry> calRecords) {
AbstractUploaderDevice deviceStatus = AndroidUploaderDevice.getUploaderDevice(context);
boolean allSuccessful = true;
for (BaseUploader uploader : uploaders) {
// TODO(klee): capture any exceptions here so that all configured uploaders will attempt
// to upload
allSuccessful &= uploader.uploadRecords(glucoseDataSets, meterRecords, calRecords, deviceStatus);
}
// uploaders were executed.
return allUploadersInitalized && allSuccessful && (uploaders.size() != 0);
}
Aggregations