Sleep and Steps charts already have the day/way/month sub-charts that
already use the "Mon, Sep 7" format. This commit attempts to make the
rest of the date formatting more consistent with that format in the
activity list and the base navigation bar at the bottom of all charts.
Closes#2412
Signed-off-by: Linos Giannopoulos <linosgian00@gmail.com>
Currently the user isn't informed about errors when connecting to
the watch and is left with a working BT connection that isn't used at all.
Add toasts when the HiChainRequest fails or times out and disconnect
the phone. Without a successful HiChain established the connection is
useless anyways and it causes the phone to be not discoverable any more.
In addition add a timeout to the HiChainRequest, one longer for the first
pairing, where the user needs to confirm the pairing request on the watch.
The short delay is used for subsequent HiChainRequests.
The watch might not answer HiChainRequests when it was paired with a
different phone, so the added timeout and toast improves user experience
a lot since it's now clear that there was a problem.
Related to issue #4148
Related to issue #4061
Fixes issue #4062
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
As described in #1065, once the changelog was selected from the
navigation menu, and the user rotated the device, the changelog was
disappearing.
Using a DialogFragment seems to be the more idiomatic way on displaying
the changelog, and it also takes care of recreating it when the device
changes orientation.
Partially fixes#1065
Signed-off-by: Linos Giannopoulos <linosgian00@gmail.com>
The NPE was triggered by recent changes in the HearthRate Charts (503cd31d91)
Since getModel was also affected by the same NPE, the function is now changed as well.
The weather service was suffering from an off-by-one error. This is now
fixed. The weather also sends more days in its forecast. There is an
issue open in the AsteroidOS weather app to perhaps add more days to its
forcast so this should cover for it.
There is also a fix for the time not being set upon connection. I'm not
quite sure why this wasn't happening before, but it is happening now. It
might be a bit kludgy, but it is what it is.
Related to this crash on Huawei Watch GT:
nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiPacket$MissingTagException: Missing tag: 6
at nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV.getBytes(HuaweiTLV.java:219)
at nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV.getString(HuaweiTLV.java:239)
at nodomain.freeyourgadget.gadgetbridge.devices.huawei.packets.Watchface$WatchfaceParams$Response.parseTlv(Watchface.java:125)
at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.requests.Request.handleResponse(Request.java:243)
at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.ResponseManager.handleData(ResponseManager.java:131)
at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiSupportProvider.onCharacteristicChanged(HuaweiSupportProvider.java:875)
at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiLESupport.onCharacteristicChanged(HuaweiLESupport.java:80)
at nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue$InternalGattCallback.onCharacteristicChanged(BtLEQueue.java:679)
at android.bluetooth.BluetoothGattCallback.onCharacteristicChanged(BluetoothGattCallback.java:194)
at android.bluetooth.BluetoothGatt$1$8.run(BluetoothGatt.java:581)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:948)
at android.bluetooth.BluetoothGatt.-$$Nest$mrunOrQueueCallback(Unknown Source:0)
at android.bluetooth.BluetoothGatt$1.onNotify(BluetoothGatt.java:575)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:329)
at android.os.Binder.execTransactInternal(Binder.java:1299)
at android.os.Binder.execTransact(Binder.java:1253)
Devices might be connected at bluetooth-level, but not yet paired in
Gadgetbridge. These devices will not fire discovery events, so
Gadgetbridge would not be able to discover them.