This change helps improve the connection experience when GadgetBridge is
working as a background task. The glasses must be send a heartbeat
packet every 32 seconds, otherwise they will disconnect. When
GadgetBridge is running in the background there is a 15-20 second delay
between the background handler waking up. This means that when the wake
up time is sceduled for 30 seconds, it often won't be woken up for 45-50
seconds leading to almost immediate disconnect after the user turns off
the screen. The official app gets around this by using a 5 second delay
leading to ~25 seconds of delay in sleep mode, but this over sends when
the phone is awake. Instead of doing that, I maintain the 28 second
delay but I change the background thread to a higher priority so that it
more consistently wakes up within th 32 second BLE limit.
Also added support for Notifications being sent to the glasses.
Add support for:
- Charging status
- Battery level of the case
- Fetching Serial Number
- Parsing hardware information from serial number
- Add Hard Reset button
- Toggle for device level debug logging
- Bug Fix: kill heartbeat worker on disconnect
- Weather
- Toggle for 12H/24H time
- Set the dashboard to minimal on connection
This change adds in a toggle for "silent mode" which turns the displays
off and makes the glasses act like normal glasses.
This change also adds the following configuration settings:
- Screen Location/height
- Screen Depth Effect
- Head Tilt Activation Angle
- Toggle Auto Brightness
- Brightness Level
- Wear Detection
Also refactored Communications file to have a consistent naming style.
This change switches G1DeviceSupport from managing to individual devices
to using AbstractBTLEMultiDeviceSupport which allows it to manage both
BLE connections under a single support class. This also updates the
Pairing activity to make it much more reliable at bonding and pairing
both devices.
This change adds a class that mirrors AbstractBTLEDeviceSupport, except
that it holds and arrays of bluetooth queues instead of just one. This
allows a single GBDevice to be composited into a single DeviceSupport
class. This is useful if there is a gadget that has multiple bluetooth
radios, but the gadget is a single device. It could also be useful if
multiple gadgets were to be grouped under a single Device (such as a
display and a remote), this way the support class can access both
devices fully without having to send messages or it can aggregate calls
to things like onNotification and make sure it is sent to all devices.
My main goal is to add support for the Even Realities G1 Smart Glasses
which use two BLE radios (one for each lens of the glasses). This code
is quite well tested on the following branch: