this PR aims to add device for multiple connected devices at once.
A lot of stuff already works, some things need to be done:
- [x] change DeviceCommunicationService to hold multiple devices and supports
- [x] implement connect / disconnect logic
- [x] widgets, not really suited for multiple devices, so far
- [x] change the notification to show multiple devices
- [ ] change GBDeviceService#onFindDevice and similar API functions to target individual devices, not all connected.
- [x] move auto-reconnect setting to device settings
- [x] fix music event crash
- [x] work out behaviour when pressing "connect" from notification
- [ ] handle service crashes
- [ ] suit coordinator methods for multiple devices of same kind
- [x] change ACL_CONNECTED receiver to connect to devices that are not currently registered in DeviceCommunicationService
- [ ] adjust after-boot auto-connection logic
- [ ] fix hanging device support. Device says disconnected, GB says connected
- [x] firmware updater doesn't work
My attempt to make onFindDevice work was to change the arguments to ```EventHandler#onFindDevice(GBDevice device, boolean start)```.
The Problem is that this forces the device-specific implementations to also accept GBDevice as an argument.
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org>
Co-authored-by: dakhnod <dakhnod@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2526
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
- rename some methods to better indicate their functions.
- make the notification filter to be allow or deny list,
solves #2256 and #336
- make app word filter to behave based on allow/deny settings.
- make Pebble notifications to honor the allow/deny settings.
- add generic "debug function" to Debug activity.
- add Message privacy mode settings, solves #2279
* Handle all notifications via GB.
* Create all notification channels in one place.
* Lazily init notification channels.
* Re-create notification channels to update their localized names.
- make layout transparent rather then red, update the preview image
- move battery to top row to reduce size, add status indicators with icons
- add preference settings, to choose for which device this widget is
- data is no longer calculated for all devices but for a selected device
- add debug items to view and erase widget settings and registrations
(debug items are intentionally not translatable yet)
Prevent duplicate notifications with a dedicated data structure (not reusing
the anti-burst one) #1062, #657
Pebble: Forward the actions attached to notifications (not only reply)
inspired by the work of dnastase #705
This removes misuse of testNewFunctionality() and support fetching GPS data and debug logs
Fetching debug logs (Amazfit Bip/Cor) is now accessible in the debug activity
Fetching GPS data can be done by swiping in the list activity.
TODO: actually refresh list when fetching data is done :P
Also fix some android studio warnings on the go...
Pebble: Add support for dynamic Pebble background colors
- Add a couple additional icon types
- Add Lighthouse (currently unused)
- Add Transit (public transportation app)
- Tweak the colors on existing icon types
- Implement logic to grab primary (vibrant) color from app logo
- The color will be used when displaying a notification for an app
that does not have any configs bound to it.
- Alter NotificationType to support a color (named pebbleColor)
- Alter the Pebble notification poster to listen to the color from
the notification
- Alter the DeviceCommunicationService to allow for color passthrough.
- Add logic to convert HEX or Integer representations of RGB888 colors
to Pebble RGB222 format.
- make the package name retrieved lowercase.
Fixes: #815
So we do need to set the language both on change and onCreate()
For some reason, the title bar of the SettingsActivity is not updated on recreate().
Closes#787