Search in sources :

Example 21 with WeatherSpec

use of nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec in project Gadgetbridge by Freeyourgadget.

the class AppMessageHandlerHealthify method onAppStart.

@Override
public GBDeviceEvent[] onAppStart() {
    WeatherSpec weatherSpec = Weather.getInstance().getWeatherSpec();
    if (weatherSpec == null) {
        return new GBDeviceEvent[] { null };
    }
    GBDeviceEventSendBytes sendBytes = new GBDeviceEventSendBytes();
    sendBytes.encodedBytes = encodeHelthifyWeatherMessage(weatherSpec);
    return new GBDeviceEvent[] { sendBytes };
}
Also used : GBDeviceEvent(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent) WeatherSpec(nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec) GBDeviceEventSendBytes(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes)

Example 22 with WeatherSpec

use of nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec in project Gadgetbridge by Freeyourgadget.

the class AppMessageHandlerObsidian method onAppStart.

@Override
public GBDeviceEvent[] onAppStart() {
    WeatherSpec weatherSpec = Weather.getInstance().getWeatherSpec();
    if (weatherSpec == null) {
        return new GBDeviceEvent[] { null };
    }
    GBDeviceEventSendBytes sendBytes = new GBDeviceEventSendBytes();
    sendBytes.encodedBytes = encodeObsidianWeather(weatherSpec);
    return new GBDeviceEvent[] { sendBytes };
}
Also used : GBDeviceEvent(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent) WeatherSpec(nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec) GBDeviceEventSendBytes(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes)

Example 23 with WeatherSpec

use of nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec in project Gadgetbridge by Freeyourgadget.

the class AppMessageHandlerRealWeather method onAppStart.

@Override
public GBDeviceEvent[] onAppStart() {
    WeatherSpec weatherSpec = Weather.getInstance().getWeatherSpec();
    if (weatherSpec == null) {
        return new GBDeviceEvent[] { null };
    }
    GBDeviceEventSendBytes sendBytes = new GBDeviceEventSendBytes();
    sendBytes.encodedBytes = encodeRealWeatherMessage(weatherSpec);
    return new GBDeviceEvent[] { sendBytes };
}
Also used : GBDeviceEvent(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent) WeatherSpec(nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec) GBDeviceEventSendBytes(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes)

Example 24 with WeatherSpec

use of nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec in project Gadgetbridge by Freeyourgadget.

the class AppMessageHandlerSquare method onAppStart.

@Override
public GBDeviceEvent[] onAppStart() {
    WeatherSpec weatherSpec = Weather.getInstance().getWeatherSpec();
    if (weatherSpec == null) {
        return new GBDeviceEvent[] { null };
    }
    GBDeviceEventSendBytes sendBytes = new GBDeviceEventSendBytes();
    sendBytes.encodedBytes = encodeSquareWeatherMessage(weatherSpec);
    return new GBDeviceEvent[] { sendBytes };
}
Also used : GBDeviceEvent(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent) WeatherSpec(nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec) GBDeviceEventSendBytes(nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes)

Aggregations

WeatherSpec (nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec)24 GBDeviceEvent (nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent)11 GBDeviceEventSendBytes (nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes)11 ByteBuffer (java.nio.ByteBuffer)4 ArrayList (java.util.ArrayList)3 JSONObject (org.json.JSONObject)3 Paint (android.graphics.Paint)2 Pair (android.util.Pair)2 IOException (java.io.IOException)2 TransactionBuilder (nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder)2 JsonPutRequest (nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.json.JsonPutRequest)2 JSONException (org.json.JSONException)2 SuppressLint (android.annotation.SuppressLint)1 Intent (android.content.Intent)1 Cursor (android.database.Cursor)1 Uri (android.net.Uri)1 Bundle (android.os.Bundle)1 WeatherInfo (cyanogenmod.weather.WeatherInfo)1 Calendar (java.util.Calendar)1 GregorianCalendar (java.util.GregorianCalendar)1