Search in sources :

Example 1 with GetSedentaryReminderIntervalRequest

use of nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetSedentaryReminderIntervalRequest 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);
    }
}
Also used : GetEnabledFeaturesRequest(nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetEnabledFeaturesRequest) GetSedentaryReminderIntervalRequest(nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetSedentaryReminderIntervalRequest) TransactionBuilder(nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder) GetHydrationReminderIntervalRequest(nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetHydrationReminderIntervalRequest) GetGeneralSettingsRequest(nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetGeneralSettingsRequest) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 TransactionBuilder (nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder)1 GetEnabledFeaturesRequest (nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetEnabledFeaturesRequest)1 GetGeneralSettingsRequest (nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetGeneralSettingsRequest)1 GetHydrationReminderIntervalRequest (nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetHydrationReminderIntervalRequest)1 GetSedentaryReminderIntervalRequest (nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.requests.GetSedentaryReminderIntervalRequest)1