use of sugar.free.sightparser.handling.SingleMessageTaskRunner in project SightRemote by TebbeUbben.
the class ExtendedBolusActivity method onClick.
@Override
public void onClick(View view) {
ExtendedBolusMessage message = new ExtendedBolusMessage();
message.setAmount(bolusAmountPicker.getPickerValue());
message.setDuration(durationPicker.getPickerValue());
SingleMessageTaskRunner taskRunner = new SingleMessageTaskRunner(getServiceConnector(), message);
(confirmationDialog = new ConfirmationDialog(this, HTMLUtil.getHTML(R.string.extended_bolus_confirmation, UnitFormatter.formatUnits(bolusAmountPicker.getPickerValue()), UnitFormatter.formatDuration(durationPicker.getPickerValue())), () -> {
showLoadingIndicator();
taskRunner.fetch(ExtendedBolusActivity.this);
})).show();
}
use of sugar.free.sightparser.handling.SingleMessageTaskRunner in project SightRemote by TebbeUbben.
the class MultiwaveBolusActivity method onClick.
@Override
public void onClick(View view) {
MultiwaveBolusMessage message = new MultiwaveBolusMessage();
message.setAmount(immediateBolusAmountPicker.getPickerValue());
message.setDelayedAmount(delayedBolusAmountPicker.getPickerValue());
message.setDuration(durationPicker.getPickerValue());
SingleMessageTaskRunner taskRunner = new SingleMessageTaskRunner(getServiceConnector(), message);
(confirmationDialog = new ConfirmationDialog(this, HTMLUtil.getHTML(R.string.multiwave_bolus_confirmation, UnitFormatter.formatUnits(immediateBolusAmountPicker.getPickerValue()), UnitFormatter.formatUnits(delayedBolusAmountPicker.getPickerValue()), UnitFormatter.formatDuration(durationPicker.getPickerValue())), () -> {
showLoadingIndicator();
taskRunner.fetch(MultiwaveBolusActivity.this);
})).show();
}
use of sugar.free.sightparser.handling.SingleMessageTaskRunner in project SightRemote by TebbeUbben.
the class TimeSynchronizationService method onStatusChange.
@Override
public void onStatusChange(Status status) {
if (status == Status.CONNECTED) {
serviceConnector.connect();
new SingleMessageTaskRunner(serviceConnector, new ReadDateTimeMessage()).fetch(this);
} else
serviceConnector.disconnect();
}
use of sugar.free.sightparser.handling.SingleMessageTaskRunner in project SightRemote by TebbeUbben.
the class AlertService method muteAlert.
public void muteAlert() {
MuteAlertMessage muteAlertMessage = new MuteAlertMessage();
muteAlertMessage.setAlertID(latestId);
new SingleMessageTaskRunner(serviceConnector, muteAlertMessage).fetch(errorToastCallback);
Answers.getInstance().logCustom(new CustomEvent("Mute Alert"));
}
use of sugar.free.sightparser.handling.SingleMessageTaskRunner in project SightRemote by TebbeUbben.
the class AlertService method dismissAlert.
public void dismissAlert() {
DismissAlertMessage dismissAlertMessage = new DismissAlertMessage();
dismissAlertMessage.setAlertID(latestId);
new SingleMessageTaskRunner(serviceConnector, dismissAlertMessage).fetch(errorToastCallback);
Answers.getInstance().logCustom(new CustomEvent("Dismiss Alert"));
}
Aggregations