Search in sources :

Example 1 with BaseUploader

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);
}
Also used : AbstractUploaderDevice(com.nightscout.core.drivers.AbstractUploaderDevice) BaseUploader(com.nightscout.core.upload.BaseUploader)

Aggregations

AbstractUploaderDevice (com.nightscout.core.drivers.AbstractUploaderDevice)1 BaseUploader (com.nightscout.core.upload.BaseUploader)1