use of nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetGeneralSettingsRequest in project Gadgetbridge by Freeyourgadget.
the class LefunDeviceSupport method onReadConfiguration.
@Override
public void onReadConfiguration(String config) {
// Just going to read all the settings
try {
TransactionBuilder builder = performInitialized("Read settings");
GetGeneralSettingsRequest getGeneralSettingsRequest = new GetGeneralSettingsRequest(this, builder);
getGeneralSettingsRequest.perform();
inProgressRequests.add(getGeneralSettingsRequest);
GetEnabledFeaturesRequest getEnabledFeaturesRequest = new GetEnabledFeaturesRequest(this, builder);
getEnabledFeaturesRequest.perform();
inProgressRequests.add(getEnabledFeaturesRequest);
GetSedentaryReminderIntervalRequest getSedentaryReminderIntervalRequest = new GetSedentaryReminderIntervalRequest(this, builder);
getSedentaryReminderIntervalRequest.perform();
inProgressRequests.add(getSedentaryReminderIntervalRequest);
GetHydrationReminderIntervalRequest getHydrationReminderIntervalRequest = new GetHydrationReminderIntervalRequest(this, builder);
getHydrationReminderIntervalRequest.perform();
inProgressRequests.add(getHydrationReminderIntervalRequest);
performConnected(builder.getTransaction());
} catch (IOException e) {
GB.toast(getContext(), "Failed to retrieve settings", Toast.LENGTH_SHORT, GB.ERROR, e);
}
}
Aggregations