use of nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.SetHydrationReminderIntervalRequest in project Gadgetbridge by Freeyourgadget.
the class LefunDeviceSupport method sendHydrationReminderIntervalSetting.
/**
* Sends the hydration reminder interval setting to the device
*
* @param period the reminder interval
*/
private void sendHydrationReminderIntervalSetting(int period) {
try {
TransactionBuilder builder = performInitialized(SetHydrationReminderIntervalRequest.class.getSimpleName());
SetHydrationReminderIntervalRequest request = new SetHydrationReminderIntervalRequest(this, builder);
request.setInterval(period);
request.perform();
inProgressRequests.add(request);
performConnected(builder.getTransaction());
} catch (IOException e) {
GB.toast(getContext(), "Failed to set hydration reminder interval", Toast.LENGTH_SHORT, GB.ERROR, e);
}
}
Aggregations