The refactored DiscoveryActivityV2 does not freeze anymore, even under
maximum scanning intensity on older phones, and seems to not have
introduced any regressions.
Fixed a few bugs.
1. Moved from the depreciated Date object for sending over the time
2. Fixed media info sending. (It would crash when info was missing)
3. Fixed notification dismissal (Typo in removal tag from remove->removed)
4. Fixed quite a few warnings that were being brought up.
5. Added more of the supported models for AsteroidOS.
There are still a few problems that exist. Screenshotting still doesn't work. I'm just not sure how it works in GB. The AsteroidOS service is still not being detected, even though the AsteroidOSSync application is detecting it just fine.
Implement reading battery percentage.
Implement setting temperature scale used on clock display.
Communication protocol taken from: https://github.com/h4/lywsd02
Mi Band HRX: changed DeviceType key for MIBAND_HRX
Mi Band HRX: added migration to MIBAND_HRX
Mi Band HRX: added devicetype string for MIBAND_HRX
Huami HRX: removed redundant null check
Huami HRX: removed redundant supports callback
This PR:
- fixes some errors reported by `gradlew lint` and the Android Studio "Code Inspection" tool
- adds a snapshot file `lint-baseline.xml` of the remaining lint errors and warnings to be used by the linter as baseline
- adds a job for CI to run `gradlew lint` on every build
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3291
Reviewed-by: José Rebelo <joserebelo@noreply.codeberg.org>
Co-authored-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
Co-committed-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
This PR aims to optimize the method of synchronizing the menu_structure for the openSourceWatchface by making the menu_structure request from the watch obsolete.
Instead, when a new menu_structure is sent to GB via the Intent `nodomain.freeyourgadget.gadgetbridge.Q_SET_MENU_STRUCTURE`, GB remembers that JSON.
Next time a watchface is built, the JSON is embedded into that app package so the watch doesn't forget the structure.
This requires a full GB rebuild to work properky.
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3245
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Co-committed-by: Daniel Dakhno <dakhnod@gmail.com>
- Remove from Mi Band prefs
- Remove fitness goal from mi band prefs - it's also un the about user
section
- During pairing, direct user to the about user if there is invalid data
Use a more robust cast approach to prevent application crashes in some corner cases (e.g. when writing Math.round()ed values)
Since I don't own a VivoMoveHR device I couldn't test for regressions on the watch.
- Extend AbstractSettingsActivityV2
- Replace all checkbox preferences with switch preferences
- Add app:useSimpleSummaryProvider to all preferences that were in getPreferenceKeysWithSummary
- Add null checks on all prefs to fix crashes in nested preference screens
- Replace listeners with lambdas to reduce code indentation
- Set input type to number where relevant
This class introduces some of the common logic across preference
screens, handling nested PreferenceScreens, as well as the back button
and action bar title setting.
* Check for bluetooth permissions in DiscoveryActivity
* At startup we now pop up a dialog explaining why we want *any* permissions
* Fixing ControlCenterv2 permissions requests for Android S and later (requesting background location stopped *any* dialog appearing)
* Fixing all errors in DiscoveryActivity from Android Studio by catching errors
* Move permission requests around to ensure that we only call RequestMultiplePermissions from onCreate
* Only show dialog if we have permissions to request
* Fix "LifecycleOwners must call register before they are STARTED" on some Android devices: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3192/files#issuecomment-967267
Allow for support classes to send a write request response to the
device, fi requested. The standard actually expects this to happen, but
Gadgetbridge did not originally support it, so there are concerns that
enabling this globally will cause issues for devices that do not expect
the response.
See also: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2831#issuecomment-941568
- Remove notification on unneeded characteristics for Zepp OS devices
- Reset MTU before initializing device, since the support class is
reused when reconnecting, and keeping the previous high MTU before
renegotiating again can make the initialization fail sometimes
(band will never reply)
- If any of the chunked characteristics is null during initialization,
mark the device as waiting for reconnect, which will make it retry the
connection later with a backoff delay.
HuamiSupport handles configurations with performInitialize, which may
trigger a device reinitialization if called while the device is already
initializing.
Handle fitness goals in Huami2021Support, which should be one of the
last settings still missing.
Since we now handle chunked acks as of 74dac3f5c, these may happen
during device initialization. We must not use performInitialized, or
initializeDevice will be called twice, since the device will still not
be in INITIALIZING state.
Now that the target SDK was changed to 31, the `no.nordicsemi.android:dfu`
library needs to be updated, as the current version dies on Android 12+.
However, the fixed version (1.12.0) also fixed MTU handling: The previous
versions ignored the MTU settings completely for legacy DFU.
<https://github.com/NordicSemiconductor/Android-DFU-Library/pull/260>
And while our `PineTimeJFSupport` code always tried to set MTU to 517, it was
ignored. Which was good because PineTime does not support larger MTUs. So that
we need to set the correct low MTU now the library really applies it.
Note that the current version of the DFU library cannot be used right now, it
does not even compile because of androidx dependency mismatch.
Fixes#3203
- rename service identifiers for clarity
- define BLE scan filter in the coordinator (even though GB does not use those currently)
- rename `DownloadedFitFile` to `GarminFitFile`
- bump DB schema version to 49
- use `BLETypeConversions`, added the missing functions there (+ unit tests for all)
- change Java package of Protobuf definitions so that they are not discarded by Proguard
-- +add subpackages to the Proguard rules so we can subdivide the classes
+ disable device-specific settings for Vivomove (no settings yet)
- communication protocols
- device support implementation
- download FIT file storage
Features:
- basic connectivity: time sync, battery status, HW/FW version info
- real-time activity tracking
- fitness data sync
- find the device, find the phone
- factory reset
Features implemented but not working:
- notifications: fully implemented, seem to communicate correctly, but not shown on watch
Features implemented partially (not expected to work now):
- weather information (and in future possibly weather alerts)
- music info
- firmware update: only the initial file upload implemented, not used
Things to improve/change:
- Device name hardcoded in `VivomoveHrCoordinator.getSupportedType`, service UUIDs not available
- Download FIT file storage: Should be store (and offer the user to export?) the FIT data forever?
- Obviously, various code improvements, cleanup, etc.
Extract handling of packet types with large code blocks.
Incidentally fixes "intent" packets launching a full calendar sync if
intents are disabled in GB settings.
More robost toJSON that deals with unicode and null
Log messages when converting words to images so we can debug when words are being converted that shouldn't be
- Make ChartsHost independent from ChartsActivity
- Rename ChartsActivity to ActivityChartsActivity
- Rename AbstractChartFragment to AbstractActivityChartFragment
- Pull common charts logic to parent classes:
- From ActivityChartsActivity to AbstractChartsActivity
- From AbstractActivityChartFragment to AbstractChartsFragment