1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 11:33:19 +02:00
Commit Graph

4841 Commits

Author SHA1 Message Date
José Rebelo
f9ef3f47ab Extract Pebble and HPlus settings to standalone activities 2023-07-28 20:21:53 +00:00
José Rebelo
e068bfdb75 Fix crash when acquiring location 2023-07-28 20:21:53 +00:00
José Rebelo
12b5ec8415 Upgrade Settings to androidx
- 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
2023-07-28 20:21:53 +00:00
José Rebelo
f4b059f173 Introduce AbstractSettingsActivityV2
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.
2023-07-28 20:21:53 +00:00
José Rebelo
597373f126 Allow filtering notifications from work profile apps 2023-07-28 18:53:50 +01:00
José Rebelo
078d3e2a55 Make application list sorting case-insensitive 2023-07-28 18:50:02 +01:00
José Rebelo
48ee259d89 Bangle.js: Reorganize device settings 2023-07-27 18:38:15 +01:00
hrglpfrmpf
c1fd0b77ad Support for Withings Steel HR (#2831)
Co-authored-by: hrglpfrmpf <hrglpfrmpf@web.de>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2831
Co-authored-by: hrglpfrmpf <hrglpfrmpf@noreply.codeberg.org>
Co-committed-by: hrglpfrmpf <hrglpfrmpf@noreply.codeberg.org>
2023-07-26 17:20:43 +00:00
José Rebelo
606e20a065 Amazfit GTR/S 3: Enable AGPS Updates 2023-07-25 21:47:12 +01:00
José Rebelo
69ae0817cf Upgrade Q-Hybrid watchface settings to androidx 2023-07-25 20:52:39 +01:00
José Rebelo
bac1d35479 Upgrade notification settings to androidx 2023-07-25 19:52:12 +01:00
Daniele Gobbetti
53c06b8c31 Introduce native app shortcuts for android > 30 2023-07-25 18:28:35 +02:00
Daniele Gobbetti
540a4499f6 Miband 6: enable PAI and Stress support 2023-07-25 18:23:15 +02:00
José Rebelo
cac92fdc26 Upgrade discovery and pairing preferences to androidx 2023-07-25 12:24:42 +01:00
Gordon Williams
1b281c7c62 Fixing SecurityErrors on Android 12+ discovered via Play Store (after API31 update)...
* 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
2023-07-25 11:50:53 +01:00
José Rebelo
f08c08005b Upgrade about user preferences to androidx 2023-07-25 09:22:45 +01:00
José Rebelo
cac41ea945 Upgrade charts preferences to androidx 2023-07-25 09:22:41 +01:00
José Rebelo
116703adff Pull reusable preferences logic to AbstractPreferenceFragment 2023-07-24 23:34:00 +01:00
José Rebelo
dd91716680 Amazfit GTR 4: Whitelist fw 3.23.3.1 diff from 3.21.0.1 2023-07-24 20:08:35 +01:00
José Rebelo
3b7f4f7238 Allow for gatt write request responses
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
2023-07-24 18:16:23 +01:00
José Rebelo
a02a6cba14 Update device settings action bar title depending on current screen 2023-07-23 22:27:11 +01:00
José Rebelo
b1ceb96100 Fix notification filters by title if notification does not contain a body 2023-07-23 21:02:46 +01:00
José Rebelo
702651c119 Sony WH-1000XM3/WF-SP800N: Add volume setting 2023-07-23 19:40:11 +01:00
Damien 'Psolyca' Gaignon
916fb6b768 Add customize buffer size on BTBRQueue 2023-07-22 19:49:34 +00:00
José Rebelo
247a954920 Huami/Zepp OS: Improve reconnection
- 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.
2023-07-22 20:31:26 +01:00
José Rebelo
aa87c5abeb Fix reconnect delay reset after all devices are initialized 2023-07-22 20:28:25 +01:00
José Rebelo
db4349bfc9 Huami: Display fetch operation description 2023-07-22 20:27:20 +01:00
José Rebelo
07ec8a095b Zepp OS: Handle fitness goals in Huami2021Support
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.
2023-07-22 14:35:54 +01:00
José Rebelo
76576af324 Huami 2021: Do not initialize device for chunked ack
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.
2023-07-22 13:50:54 +01:00
Arjan Schrijver
f58c655449 Fossil/Skagen Hybrids: Strip unicode characters that the watch can't display 2023-07-22 12:13:25 +02:00
mormegil
8f5c32fbee Fix PineTime firmware upload for Android 12 target
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
2023-07-22 09:54:45 +00:00
Johannes Krude
9700fef111 Casio GMW-B5000: separate DeviceType, but still using the CasioGWB5600DeviceSupport 2023-07-22 09:39:56 +00:00
Johannes Krude
685ccfd1c9 Casio GW-B5600: setAutoReconnect(true) on first connection 2023-07-22 09:39:56 +00:00
Johannes Krude
7cb060c9fe Casio GW-B5600: initial support 2023-07-22 09:39:56 +00:00
Johannes Krude
91415e2500 Casio: Refactoring 2023-07-22 09:39:56 +00:00
José Rebelo
57ef0ded64 Sony WH-1000XM5: Fix speak-to-chat enable/disable 2023-07-22 10:24:33 +01:00
José Rebelo
5c78488e93 Fix emoji transliteration 2023-07-20 21:54:31 +01:00
mormegil
cc8a1dbdaa Added copyright header to all new Garmin Vivomove files 2023-07-20 20:30:14 +00:00
mormegil
a4ec3a62aa PR-related improvements
- 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
2023-07-20 20:30:14 +00:00
mormegil
dccb8ed1c4 Changes suggested in PR
- 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)
2023-07-20 20:30:14 +00:00
Mormegil
3a58314db6 Garmin Vivomove HR support
- 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.
2023-07-20 20:30:14 +00:00
Mormegil
114f6fcbf0 First piece of Garmin Vivomove HR support basics
- `DeviceType` definition
- Definition of activity sample table
- Coordinator and sample provider
2023-07-20 20:30:14 +00:00
José Rebelo
bdb904faf9 Fix character mark removal before flattening to ASCII 2023-07-17 22:42:53 +01:00
José Rebelo
12dd9651e7 Fix opening screenshots from notification on external apps 2023-07-17 00:09:10 +01:00
vanous
849337b447 Amazfit Neo: Enable PAI 2023-07-16 22:57:18 +02:00
José Rebelo
258023a05d Zepp OS: Fix reminder creation
Regression introduced by 9d3c480414
2023-07-12 23:27:15 +01:00
José Rebelo
525f1567c1 Huami: Prevent activity data fetch if there is no data to fetch
More information in #3201

Fixes #3196
2023-07-12 23:21:56 +01:00
José Rebelo
ccfc112e2b Huami: Persist workout raw details even if gpx has no points 2023-07-12 23:18:31 +01:00
Richard de Boer
8e270fcbf7
Bangle.js: refactoring
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.
2023-07-11 20:46:50 +02:00
José Rebelo
4c7920133b Amazfit GTS 2e: Add activate display on lift sensitivity 2023-07-11 18:19:43 +01:00
José Rebelo
226ccd9fad Remove duplicated media session handling code 2023-07-09 17:39:21 +01:00
José Rebelo
3da539be23 Bohemic Smart Bracelet: Initial support 2023-07-09 14:29:39 +00:00
José Rebelo
298dbbe777 LeFun: Broadcast when HR samples are received 2023-07-09 14:29:39 +00:00
José Rebelo
da5f91f05b Huami/Zepp OS: Improve music info stability 2023-07-09 15:16:37 +01:00
José Rebelo
ac89b1df9d Use package name for Catima permissions
The Catima permissions had to be split per package-name to avoid
conflicts between debug and release channels due to mismatching apk
signatures.

See https://github.com/CatimaLoyalty/Android/pull/1411
2023-07-09 14:29:30 +01:00
Benjamin Swartley
739bd1b5a8 Use AudioManager for Media Buttons
Switch from ACTION_MEDIA_BUTTON to all AudioManager

Add mb_intents pref for audioplayer
2023-07-08 23:13:04 +00:00
José Rebelo
665268c419 Fix Weather notification integration 2023-07-07 09:03:35 +01:00
José Rebelo
708cb0c617 Zepp OS: Attempt to parse raw sensor values 2023-07-05 17:47:19 +01:00
José Rebelo
3516099dc9 Fix crash if Catima is not installed 2023-07-04 09:43:35 +01:00
José Rebelo
fea3bf50a4 Zepp OS: Add loyalty cards integration with Catima 2023-07-03 23:19:19 +01:00
José Rebelo
e95c8a3775 Add PAI charts 2023-07-02 16:05:10 +01:00
Gordon Williams
88e0b9543d Bangle.js: HTTP request XPath can now return Arrays.
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
2023-06-30 11:34:53 +01:00
Gordon Williams
0e0f72410a Bangle.js: fix mixup of navigation left slight&sharp icons 2023-06-29 14:49:22 +01:00
Gordon Williams
d82ba7a04c Bangle.js: Send the timestamp of our last activity sample to the Bangle on connect, so that it can update us on missing activity samples 2023-06-26 11:39:29 +01:00
Gordon Williams
2aac797dec Remove some build warnings in BangleJSDeviceSupport 2023-06-26 11:20:50 +01:00
Gordon Williams
8e010bc6dd Stop BangleJSDeviceSupport repeatedly calling GBLocationManager.stop and spamming the log with "Stop location updates" 2023-06-26 11:15:54 +01:00
Gordon Williams
94cd7523db Ensure we now escape chars in the unicode start range. With Bangle.js ~2v18.20+ we added Unicode support, but if we're sending non-unicode chars in the unicode range it will confuse Espruino 2023-06-26 11:07:38 +01:00
Lukas
6e3ce89ae5 add attribute to set the source of the gps signal 2023-06-22 21:37:55 +00:00
Lukas
6da6baa5e6 Add switch to control if the GPS chip should be used to locate the location 2023-06-22 21:37:55 +00:00
Arjan Schrijver
7c5cd4c032 Fossil/Skagen Hybrids: Increase accuracy of workout distance calculation 2023-06-19 15:57:09 +02:00
Arjan Schrijver
2081463a4f Fossil/Skagen Hybrids: Add UV index and chance of rain widgets
Note: this needs support from weather apps, for example:
https://github.com/TylerWilliamson/QuickWeather/pull/69
2023-06-18 22:11:07 +02:00
Arjan Schrijver
ff563022f5 Fossil/Skagen Hybrids: Fix weather icons day/night status 2023-06-17 22:54:41 +02:00
José Rebelo
88b7cd5756 Add stress charts 2023-06-17 17:28:11 +01:00
José Rebelo
fec48c4340 Generalize charts logic for non-activity data
- 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
2023-06-16 23:53:28 +01:00
José Rebelo
9d3c480414 Zepp OS: Refactor config, display items, reminders and http to standalone services 2023-06-16 20:43:07 +01:00
José Rebelo
8f5bbec881 Zepp OS: Only cache apps and watchfaces 2023-06-15 22:07:08 +01:00
José Rebelo
fad7fa395b Zepp OS: Show watchfaces in app management 2023-06-15 22:04:01 +01:00
José Rebelo
5957f71110 App Manager: Fill out missing app info from cache 2023-06-15 22:01:16 +01:00
José Rebelo
9b7d5eee42 Zepp OS: Cache apps for app management 2023-06-15 21:59:16 +01:00
José Rebelo
853470a2bd Revert "Zepp OS: Unify support class and fw handling"
This reverts commit d59e8c3f62.

We need to refactor the Huami classes too, otherwise this needs a lot of
hacks to work properly.
2023-06-15 21:39:22 +01:00
José Rebelo
d59e8c3f62 Zepp OS: Unify support class and fw handling 2023-06-15 20:50:15 +01:00
José Rebelo
daec12e13b Amazfit GTR 3/GTS 3/GTR 3 Pro/T-Rex 2: Revert AGPS updates
Users reported that this is not actually working - further information
on the protocol is needed.

- Reverts 1898962e79 and 55cef71d3a
2023-06-15 13:09:29 +01:00
José Rebelo
1b44f3566e Prevent UI freeze when a folder has a lot of devices
Do not include the devices from collapsed folders in the array.
2023-06-14 21:24:26 +01:00
José Rebelo
5f0689d2e1 Make screenshot notification strings translatable 2023-06-14 21:02:27 +01:00
José Rebelo
5df25effba Make screenshot notifications high priority 2023-06-14 21:02:27 +01:00
José Rebelo
b3db9b7768 Zepp OS: Add screenshot support 2023-06-14 21:02:27 +01:00
José Rebelo
531aef61fd Move screenshot encoding to PebbleProtocol 2023-06-14 21:02:27 +01:00
José Rebelo
55cecceb38 Zepp OS: Add support for compressed file transfer 2023-06-14 21:02:27 +01:00
José Rebelo
d29e092ce7 Zepp OS: Fix file transfer service incoming file size parse 2023-06-14 21:02:27 +01:00
José Rebelo
3217e4a2dd Zepp OS: Add missing ack on file transfer service 2023-06-14 21:02:27 +01:00
José Rebelo
74dac3f5cd Huami 2021: Handle chunked ACKs 2023-06-14 15:45:49 +00:00
Andreas Shimokawa
f80b873866 Prefs: make allow high MTU default to true.
It is 2023, it should work, if not it can be turned off.

For newer devices with big firmwares and apps (like Mi Band 7), people just wonder how slow Gadgetbridge installs stuff...
2023-06-14 16:44:51 +02:00
José Rebelo
7262197a34 BTBR: Fix device update intent subject on connection change 2023-06-13 22:37:35 +01:00
Damien 'Psolyca' Gaignon
a3c0e10330
Add GBDevice argument to getAlarmSlotCount 2023-06-13 23:10:55 +02:00
Damien Gaignon
be575af314 Add BTBR service 2023-06-13 12:06:13 +00:00
Gordon Williams
b2aa61e182 Changed NavigationSpec's distance into a String.
Previously we used an integer (in meters) but when using
Google Maps navigation, Google Maps picks units based on locale *and*
the distance - it might report "100m" or "20km". Then we carefully undo
all that work, and for PineTime we just as "m" so you may well have "20000m"
or more displayed, which is not ideal.

I imagine at some point that will change, but we probably want to
be able to handle that in the OSMAnd side of Gadgetbridge so all watches
that implement navigation will benefit (and won't duplicate code).
2023-06-13 07:32:12 +00:00
José Rebelo
5c3b76b838 Add missing mutability flags to PendingIntents 2023-06-13 00:14:04 +01:00
José Rebelo
8899187ee4 Replace forEach with explicit for cycle
forEach with lambda is only available in SDK24+
2023-06-13 00:11:42 +01:00
José Rebelo
1898962e79 Amazfit GTR/S 3: Enable AGPS Updates 2023-06-12 20:56:55 +01:00
José Rebelo
5b2ebeb4c4 Zepp OS: Fix AGPS and gpx route upload compatibility detection 2023-06-12 19:50:57 +01:00
José Rebelo
55cef71d3a Amazfit T-Rex 2: Enable AGPS updates and gpx route upload 2023-06-12 09:32:08 +01:00
José Rebelo
9e09fe15bf Huami: Fix stress sample timestamp increment 2023-06-12 08:58:10 +01:00
José Rebelo
c666947a28 Intent API: Add command to set device mac address 2023-06-11 19:52:30 +00:00
José Rebelo
9393d2c28f Zepp OS: Add service to query supported services 2023-06-11 18:34:40 +01:00
José Rebelo
c3c4c2ce74 Zepp OS: Add watch app logs developer option 2023-06-11 18:23:54 +01:00
José Rebelo
d38afe60c2 Zepp OS: Add incoming file support to file transfer service 2023-06-11 15:21:39 +01:00
José Rebelo
c77a5467e7 Fix typo in connection priority variable 2023-06-11 00:44:20 +01:00
José Rebelo
8ff3ce0477 Zepp OS: Add experimental app management 2023-06-10 23:31:38 +01:00
José Rebelo
89b23f77b7 App Manager: Fix cached apps sorting 2023-06-10 21:04:41 +00:00
José Rebelo
240326c99a App Manager: Hide drag handle if app reorder is not supported 2023-06-10 21:04:41 +00:00
José Rebelo
c1339aa5c6 App Manager: Only set up to date apps on FOSSILQHYBRID 2023-06-10 21:04:41 +00:00
José Rebelo
6dcd055d0d App Manager: Add confirmation before deleting app 2023-06-10 21:04:41 +00:00
José Rebelo
d77a32a430 Zepp OS: Add code to toggle raw sensor data 2023-06-10 19:07:00 +01:00
José Rebelo
a3c59b0e0e Zepp OS: Add experimental sync of SpO2, stress, PAI, HR stats and sleep respiratory rate 2023-06-10 17:19:22 +01:00
José Rebelo
58704a0eec Zepp OS: Make Alexa an experimental feature 2023-06-10 17:15:36 +01:00
José Rebelo
3716a031ce Zepp OS: Implement Alexa service protocol 2023-06-10 17:05:09 +01:00
José Rebelo
46dfd1040a Add action to request connection priority 2023-06-10 17:00:40 +01:00
José Rebelo
42c37c04a0 Zepp OS: Display watchface and app preview on install 2023-06-10 13:34:48 +01:00
José Rebelo
003246ae1c Zepp OS: Fix zpk compatibility detection 2023-06-10 12:41:10 +01:00
Ganblejs
20de001e49 Bangle.js: Add more weather data sent to watch
Specifically UV Index, the day max and min temp, probability of rain.
Inspired by PR #3095

Bangle.js:Send UV Index with one decimal point
2023-06-09 20:55:32 +02:00
José Rebelo
1730064f11 Zepp OS: Match zpk compatibility by deviceSource 2023-06-09 18:35:29 +01:00
Gordon Williams
1fa8936544 Google Maps: Added more recognised icons - needed another enum for going all the way around a roundabout 2023-06-09 13:59:05 +01:00
Arjan Schrijver
0b241af8e7 Force FlattenToAsciiTransliterator to return only ASCII 2023-06-09 10:13:10 +00:00
Gordon Williams
735f27d5bf Add Navigation handling to Bangle.js
Add extra 'ETA' field to NavigationInfoSpec
Allow Local Notifications from Google Maps to be parsed into NavigationInfoSpec by GoogleMapsNotificationHandler

Moved notification handling after blacklist check as per https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3136#issuecomment-920095

Ensure we don't create a nav message for 'Location Shared with you' messages.
Recognise 'ft' as a distance unit and convert accordingly

Google Maps navigation: Adding new recognised icons, and removing warnings/errors from file
2023-06-09 08:50:40 +01:00
kieranc001
9c682da4cc Fix typos for Pinetime weather expiry time
The expiry time should be 6h (60 * 60 * 6), but has been set to 6 minutes (60 * 6) unintentionally in 3 places. 
This change sets the expiry to the correct value throughout the file.

Signed-off-by: kieranc001 <kieranc001@noreply.codeberg.org>
2023-06-08 14:30:10 +00:00
José Rebelo
dd01c77aca Zepp OS: Support flashing zab files 2023-06-08 14:22:15 +01:00
José Rebelo
594a611065 Zepp OS: Fix update operations on Zepp OS 2.1+ 2023-06-08 13:36:53 +01:00
Gordon Williams
b334773856 Bangle.js: fix the rare case where we're converting an emoji/unicode to a bitmap but it doesn't have a width/height - we just create a bitmap of min. 1px 2023-06-08 12:36:12 +01:00
Gordon Williams
e59375242e Bangle.js: Allow an activity sample to have a time specified - first steps in allowing Bangle.js to send 'missed' health data 2023-06-06 20:25:58 +01:00
Enrico Brambilla
93e8996b52 Fossil/Skagen Hybrids: Add support for ultraviolet index and rain probability
Updates WeatherSpec to v3 to add fields for UV index and precipitation probability
Co-authored-by: Enrico Brambilla <enricobilla@noreply.codeberg.org>
Co-committed-by: Enrico Brambilla <enricobilla@noreply.codeberg.org>
2023-06-05 19:52:26 +00:00
Richard de Boer
7e1685f5f9 Bangle.js: fix memory leak from HTTP requests
Every call to Volley.newRequestQueue() creates a new global thread pool,
which isn't automatically cleaned up once the request completes.
With this commit we create a RequestQueue around on first use, and reuse
it for subsequent requests.
2023-06-05 10:09:28 +00:00
José Rebelo
0c52f3d3da Improve notification logging
- Reduce duplicated and redundant messages
- Log notification priority
- Add log entry for notification ignored by dnd
2023-06-03 20:28:27 +01:00
José Rebelo
eb7366c7e3 Huami 2021: Prevent duplicated payload logging 2023-06-03 20:25:23 +01:00
José Rebelo
ed3ce6fa9d Huami: Fix stress timestamp off by 1 minute 2023-06-02 23:31:47 +01:00
Aidan Crane
29bf03dceb
Re-added ability to make Mi Band 6 visible in third party apps 2023-05-31 02:42:45 +01:00
Ganblejs
7d1de4a5e8 Bangle.js: Bump flavor targetSdkVersion to 31
This also touches parts of the app not only used for bangle.js.
E.g. pending intents gets new flags from SDK 23 inclusive.
Bluetooth permissions are updated to work on SDK 31.
Permission handling is updated to the new way for doing it with
introduction of a new function. This is called for newer sdk versions.

bump Bangle.js flavor targetSdkVersion to 31

update comments re SDK 31

set the 'exported=true' I introduced to false instead - except for three places

add uses-permission for handling bluetooth in order to work on api >30

add if-blocks adding FLAG_IMMUTABLE to PendingIntents on api >30

add link to bluetooth documentation

Add comment to banglejs manifest. Add requirement annotation to ControlCenterv

bump compileSdkVersion to 31

add "OpenAppSettings" permission popup while working out individual permission popups on android 13

if SDK < 31 do permissions one by one, else send user to app info page to switch permissions manually

working solution, but needs cleaning

do some cleaning, not done though

remove some logging

remove import Log

tweak and remove toasts in new permissions handling

Change conditions `> Build.VERSION_CODES.Q` to `>= Build.VERSION_CODES.R` matching the style used everywhere else

Revert "Change conditions `> Build.VERSION_CODES.Q` to `>= Build.VERSION_CODES.R` matching the style used everywhere else"

This reverts commit 2929629ff43fbb685eb3d15e42459f321f68fa11.

Revert "add if-blocks adding FLAG_IMMUTABLE to PendingIntents on api >30"

This reverts commit ed8e1df7bb8b71fee745fbf9d10747d47c8f6cb8.

Pending intents gets `PendingIntent.FLAG_IMMUTABLE` if `(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)`.

Bangle.js: undo `@RequiresApi` code R

... to remove error in Android Studio where declared required api was
higher then minSDK version.

Use FLAG_MUTABLE for reply to test notification

This should fix Gadgetbridge crashing when replying to the test
notification from the debug activity. As reported here:
https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2924#issuecomment-917282

Change to use FLAG_IMMUTABLE/_MUTABLE from SDK 23

... as suggested by Android Studio. This is supposed to make the app
more secure by not allowing certain changes to pending intents where
they are not expected. If I understood correctly.

Add PendingIntentUtils class to manage mutability
2023-05-30 00:25:20 +02:00
octospacc
514f983299 Intent API: Update DEBUG_SEND to DEBUG_SEND_NOTIFICATION, and make fields clearer 2023-05-29 23:55:54 +02:00
octospacc
2659a23421 Intent API: Add allow_debug_commands option and receivers for SEND, INCOMING_CALL 2023-05-29 22:57:34 +02:00
José Rebelo
7e15462593 Huami: Migrate activity fetching to repeated fetch operation 2023-05-29 20:11:42 +01:00
José Rebelo
e55a35eced Huami: Persist sleep respiratory rate data 2023-05-27 19:03:43 +01:00
José Rebelo
a1e07b5d1b Huami: Persist PAI samples 2023-05-27 19:02:01 +01:00
José Rebelo
24f78655c2 Huami: Persist heart rate max, resting and manual samples 2023-05-27 18:59:12 +01:00
José Rebelo
592356faf1 OsmAnd: Make navigation instructions configurable 2023-05-26 11:26:22 +00:00
José Rebelo
b4c2fa21bc Extract ShowDurationDialog from ChartsActivity 2023-05-25 23:45:03 +01:00
José Rebelo
79e3df4844 Extract inner classes from AbstractChartFragment
No code changes, will simplify future refactor and reuse.
2023-05-25 23:40:21 +01:00
José Rebelo
b091521155 Mi Band 7: Add preference to display call contact information 2023-05-24 23:47:20 +01:00
José Rebelo
347048dae5 Mi Band 7: Whitelist firmware 2.0.0.2 2023-05-24 23:33:02 +01:00
José Rebelo
9d966c8179 Huami: Add max HR fetch operation (no db persistence) 2023-05-23 22:35:24 +01:00
José Rebelo
c79a833bbf Huami: Add PAI fetch operation (no db persistence) 2023-05-23 22:25:58 +01:00
José Rebelo
733e5dd290 Huami: Map UTC offset in HR and respiratory rate fetch operations 2023-05-23 00:05:03 +01:00
Martin Boonk
fd9efdcb72 Bangle.js: Match default interval from resource file 2023-05-22 22:17:10 +00:00
Martin Boonk
88161bed91 Bangle.js: Inform user if GPS set to off in settings 2023-05-22 22:17:10 +00:00
Martin Boonk
d4bcbc52fb Bangle.js: Fix typo 2023-05-22 22:17:10 +00:00
Martin Boonk
a57a8cc7ca Bangle.js: Fix location listener not being cleaned up when waiting for reconnect 2023-05-22 22:17:10 +00:00
José Rebelo
3f87bfadd4 Huami: Add queued fetch operations 2023-05-22 22:15:35 +00:00
José Rebelo
23e9a3deb1 Huami: Persist stress and SpO2 data 2023-05-22 22:15:35 +00:00
José Rebelo
25038d965f Introduce generic TimeSamples for recorded data 2023-05-22 22:15:35 +00:00
Gordon Williams
788cb15500 Based on Play Store crash reports and stack traces, add a null check to try and avoid crashes 2023-05-22 13:38:04 +01:00
Gordon Williams
82778c46a5 Bangle.js: ensure we can return to appsmanagementactivity after having opened another window
Attempting to handle file open and close dialogs from the WebView
2023-05-22 13:13:50 +01:00
Andreas Shimokawa
55e7f6595b fix build after rebase 2023-05-21 22:50:52 +02:00
Ernst
56e1efaa3d Fixed typo in "continue" turn and added roundabout left,right and offroute turns 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
9ccd898d42 add supportNavigation() to cooridinator 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
e7c048551f Infinitime: Fix icon mapping 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
4cad3b3837 InfiniTime: support navigation app 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
93b9ee735c add missing file 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
d7e2f1ff8c make use of onSetNavigationInfo() in osmand receiver.
This is not implemented anywhere, purely preparing for further experiments
2023-05-21 22:50:52 +02:00
Andreas Shimokawa
48dee7486f add onSetNavigationInfo() to device interface 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
6379036559 subscribt to voice info also 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
0d1a1f8a9f experiment with osmand
add osmand license note to readme
Cleanup unneeded aidl and java
2023-05-21 22:50:52 +02:00
José Rebelo
3a5d5dfbb0 Huami: Add sleep respiratory rate fetch operation (no db persistence) 2023-05-21 21:14:29 +01:00
José Rebelo
07357305cb Huami: Unify recorded data fetching in HuamiSupport 2023-05-20 20:44:18 +01:00
José Rebelo
8cda2f74e8 Extract NonSwipeableViewPager to standalone class 2023-05-19 21:24:27 +01:00
Gordon Williams
757e36ebd6 Bangle.js: Add message size limitation to Calendar and Messages - stops huge data streams being sent out esp for calendar events 2023-05-19 10:46:37 +01:00
Gordon Williams
0debd26a37 Add null pointer check based on Google Play store reports:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getPath()' on a null object reference
2023-05-19 09:44:10 +01:00
José Rebelo
36d2fde49b Zepp OS: Improve weather models 2023-05-18 23:39:24 +01:00
José Rebelo
2b6a79f462 Zepp OS: Manage contacts on watch 2023-05-17 23:43:29 +01:00
José Rebelo
f68e4c865b Huami: Add stress, SpO2, heart rate fetch operations (no db persistence)
Introduce a reusable abstract logic for repeated fetch operations.

Add fetch operations for the following:
- Stress (manual and automatic)
- SpO2 (normal and sleep)
- Heart rate (manual and resting)
2023-05-17 21:56:54 +01:00
Arjan Schrijver
0bba156bec Deduplicate icon retrieval code 2023-05-17 14:09:17 +02:00
José Rebelo
b1a9adadc3 Intent API: Add dataTypes parameter for activity sync 2023-05-16 21:34:05 +01:00
José Rebelo
76d99f1c33 Zepp OS: Start new GPX segments on pause/resume 2023-05-14 16:22:32 +01:00
José Rebelo
a8b9d22313 Add menus to share GPX, raw summary, raw details 2023-05-14 16:10:25 +01:00
José Rebelo
9851493cf1 Zepp OS: Add gpx route file upload 2023-05-14 14:20:39 +01:00
José Rebelo
01ec74602a Refactor and extend GpxParser 2023-05-14 14:19:48 +01:00
José Rebelo
87c91fb9b0 Debug Activity: Allow pairing current device as companion 2023-05-13 17:07:02 +01:00
José Rebelo
e1cccd6953 Zepp OS: Refactor code for alarms, notifications, calendar, canned messages 2023-05-10 23:33:23 +01:00
Arjan Schrijver
f727f2fdcb Fossil/Skagen Hybrids: Pair watch to phone, fixes repeating confirmation request 2023-05-08 22:44:43 +02:00
José Rebelo
e0d481bb36 Sony WH-1000XM5: Add power off, fix battery, fix speak-to-chat fetch 2023-05-06 17:41:10 +01:00
José Rebelo
7b3fbeb4af Sony WH-1000XM5: Initial support 2023-05-06 16:03:48 +01:00
José Rebelo
e4933a0b42 Sony Headphones: Improve unit tests 2023-05-06 14:41:28 +01:00
José Rebelo
880bf9e1b1 Amazfit GTR 3 Pro: Initial support 2023-05-03 20:49:02 +01:00
José Rebelo
483ef27a4f Zepp OS: Set region on user info
This affects available features (eg. Alexa). Defaults to the previous
value of "unknown" for now, and no UI. Alexa requires a region where it
is available, such as Germany ("de").
2023-04-30 17:03:05 +01:00
José Rebelo
6c0a276441 Zepp OS: Add code for AQI shortcut card 2023-04-30 11:55:34 +01:00
José Rebelo
1d0b10ed0f Zepp OS: Refactor services config and init logic 2023-04-30 11:42:34 +01:00
José Rebelo
94c7b43ad4 Zepp OS: Map known watchfaces to human-readable names 2023-04-26 09:51:14 +01:00
José Rebelo
9a8e95bd18 Zepp OS: Set watchface from phone 2023-04-24 20:20:43 +01:00
José Rebelo
3c3936bf6a Zepp OS: Add shortcut cards preference 2023-04-24 19:12:22 +01:00
José Rebelo
ad8069b38d Zepp OS: Fix setting of control center 2023-04-22 22:56:18 +01:00
Sky233ml
83c83580da Zepp OS: Fix Cards and MI AI display item and shortcuts 2023-04-16 10:51:56 +08:00
José Rebelo
c21d53ab49 Zepp OS: Add driving workout code 2023-04-09 13:45:46 +01:00
Arjan Schrijver
b892748b15 Cache notifications while devices are out of range (opt-in) 2023-04-05 11:11:23 +02:00
José Rebelo
340db0ca15 Amazfit GTR 4 / GTS 4: Perform and receive phone calls on watch 2023-04-02 18:50:58 +01:00
José Rebelo
f1dd4019bf Zepp OS: Add support for morning updates 2023-04-01 20:58:21 +01:00
José Rebelo
4713c6511e Zepp OS: Manage contacts on watch (protocol only) 2023-04-01 13:51:23 +01:00
José Rebelo
58686ae7d7 Sony WH-1000XM4: Attemptto fix handling of speak to cheat enabled 2023-03-24 00:39:02 +00:00
José Rebelo
2ec68dbef4 Sony WH-1000XM4: Attempt to fix handling of speak to cheat enabled 2023-03-24 00:37:15 +00:00
José Rebelo
f2a7f6ab45 Sony WH-1000XM4: Add speak-to-chat settings 2023-03-24 00:03:54 +00:00
José Rebelo
d7ecfcb16b Sony WH-1000XM4: Add speak-to-chat 2023-03-23 21:50:40 +00:00
thirschbuechler
da001544c5 add CroatianTransliterator 2023-03-21 20:00:28 +00:00
Gordon Williams
2a5cd559d5 Fix issue updating timezone in setting.json if the timezone is zero (https://github.com/espruino/BangleApps/issues/2575) 2023-03-21 15:08:59 +00:00
José Rebelo
aeb8607e78 Amazfit GTR 4 / GTS 4: Add watch Wi-Fi Hotspot and FTP Server 2023-03-21 00:02:59 +00:00
José Rebelo
d6b1b778b8 Zepp OS: Add preference for camera remote 2023-03-19 22:35:02 +00:00
José Rebelo
00954dfa6d Zepp OS: Add config to keep screen on during workout 2023-03-19 22:25:44 +00:00
José Rebelo
ac002f8db9 Zepp OS: Fix activate display upon lift wrist smart mode 2023-03-19 22:11:39 +00:00
José Rebelo
443f13c11d Zepp OS: Fix setting of unknown configuration values
Unknown configuration values are displayed in the UI as "Unknown (0x*)".
We can then attempt to parse them as hex and send the value.
2023-03-19 22:05:37 +00:00
José Rebelo
f0a05ded91 Amazfit GTR 4: Whitelist fw 3.18.1.1 diff from 3.17.0.2
Differential firmware updates are installed just like normal updates.
2023-03-19 15:53:17 +00:00
Joel Beckmeyer
ed9c746059 fix saving app notification/pebble blacklist preferences on import 2023-03-18 17:54:55 +00:00
Joel Beckmeyer
a8da4cf6d1 Amazfit Bip U: disable alarm snooze enable/disable 2023-03-17 15:46:46 -04:00
Oleg Vasilev
007f070125 huami: implement repeated activity fetching
Currently, huami only attempts to fetch activities once.

Since sports activity fetching creates an Operation twice per every fetch, we
need to pass around fetchCount variable to keep track of how many fetches has
occured.

Tested on my Amazfit GTR 4.

Signed-off-by: Oleg Vasilev <me@svin.in>
2023-03-11 15:02:00 +00:00
Andreas Shimokawa
d07fec33ca SoFlow SO6: Add light command and request lock state 2023-02-21 16:09:23 +01:00
Andreas Shimokawa
4bd8c20a6d SoFlow SO6: few cleanups and more testing 2023-02-21 16:09:23 +01:00
Andreas Shimokawa
74517f12a3 SoFlow SO6: First working lock&unlock
needs key
2023-02-21 16:09:23 +01:00
Andreas Shimokawa
5db9d36d1a SoFlow SO6: fix settings 2023-02-21 16:09:23 +01:00
Andreas Shimokawa
27406e0881 SoFlow SO6: WIP 2023-02-21 16:09:23 +01:00
narektor
84e452bd6b Galaxy Buds2 Pro support (this time proper) (#3049)
Mostly copied from the Buds Pro as those earbuds have a similar feature set and mostly the same protocol.

Working:
- Pairing
- Earbud and case battery level
- Finding lost device
- Settings:
	- Noise control:
    	- ANC/ambient/off
        - With one earbud
        - Voice detect and timeouts
    	- Ambient sound during calls
    - Touch options:
    	- Touch lock
        - Switch noise control, voice assistant, Spotify and volume actions
    	- Double tap edge
    - Equalizer
    - Sound balance
	- Seamless earbud connection

Can be improved:
- ~~ANC level and ambient sound volume do nothing, and don't seem to be supported on this model as there is no toggle for either in the official app.~~ (fixed: 26a9d274ae)
- Ambient sound customization has more options than on previous models, but I can't implement it properly as I can't really hear any difference between the options (my buds might be the issue though).
- ~~The touch lock toggle is once again inverted, like on the [Buds2](d2c4990c48)~~ (fixed: 21db5390c1).

Untested:
- Settings:
    - In-ear detection for calls
    - Ambient sound customization
    - Game mode

This PR also makes some visual changes to the settings of various Galaxy Buds models.

I'd also like to be added to the wiki's allow list. I want to add the Buds2 and Buds2 Pro to the list of supported devices.

---

And sorry for creating this many pull requests. This is mostly due to Codeberg breaking the reference to the branch.

Co-authored-by: Narek <narek.email@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3049
Reviewed-by: José Rebelo <joserebelo@noreply.codeberg.org>
Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org>
Co-authored-by: narektor <narektor@noreply.codeberg.org>
Co-committed-by: narektor <narektor@noreply.codeberg.org>
2023-02-21 14:50:24 +00:00
vanous
92cce3bbf2 Fix GeorgianTransliterator 2023-02-15 15:44:55 +01:00
halemmerich
90771891a5 Bangle.js: Additional values for GPS event (#3026)
This tries to use bearing and number of satellites if available. ~~Bangle.js watch currently sets course=NaN in it's implementation of the GPS event handler, so to be of use this needs a small change there as well: [https://github.com/espruino/BangleApps/pull/2504](https://github.com/espruino/BangleApps/pull/2504)~~ Change has been merged.

Please advise on needed changes or oversights, thanks :)

Co-authored-by: Martin Boonk <martin@boonk.info>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3026
Co-authored-by: halemmerich <halemmerich@noreply.codeberg.org>
Co-committed-by: halemmerich <halemmerich@noreply.codeberg.org>
2023-02-14 10:45:58 +00:00
Albert
56ec206f5b [Bangle.js] check if globalUartReceiver is set and move its removal to separate method 2023-02-14 10:43:39 +00:00
Albert
2e06d7afa5 [Bangle.js] remove uart.tx intent-listener on dispose 2023-02-14 10:43:39 +00:00
Arjan Schrijver
cbf98b9308 Fossil/Skagen Hybrids: Remove useless and annoying debug message 2023-02-11 21:02:24 +01:00
roolx
11bcaeb7a8 Add Georgian Transliteration 2023-02-09 21:44:35 +00:00
Arjan Schrijver
810cc91e8e Fossil/Skagen Hybrids: Implement inactivity warnings 2023-02-06 14:26:26 +01:00
Arjan Schrijver
5ea68cad3b Fossil/Skagen Hybrids: Rewrite configuration of automatic workout detection
Fixes #2514
2023-02-06 14:22:40 +01:00
Arjan Schrijver
14f05a7cf6 Fossil/Skagen Hybrids: Fix crash on empty or multi-byte unicode alarm texts
Fixes #3024
2023-02-05 14:35:01 +01:00
Lukas
25be7cf12d Banglejs: change json key to lon when sending location data to watch 2023-01-30 21:40:30 +01:00
Arjan Schrijver
9b4f909ace Fossil/Skagen Hybrids: Update known watch app versions 2023-01-27 21:19:25 +01:00
Gordon Williams
521edc4332 Bangle.js: Increase default realtime HRM/step interval to 10 seconds
Disable manual heart rate measurement - the current implementation in Gadgetbridge seems not really compatible with Bangle.js. There's no way to turn the HRM off when the window is closed, and HRM samples from *any* device would appear to be shown - not just the one that HRM info was requested on
2023-01-26 10:31:13 +00:00
José Rebelo
134376cbd0 Amazfit T-Rex 2: Initial support 2023-01-23 23:36:57 +00:00
Gordon Williams
b16464b3b6 Bangle.js stop 'toast' warning message appearing when starting the app loader. Fix https://github.com/espruino/BangleApps/issues/2496 2023-01-13 14:28:38 +00:00
Noodlez
ead7ada987 Code clean-up and documentation 2023-01-12 17:12:03 +00:00
Noodlez
8f5997d174 AsteroidOS: Remove unused overrides
There are now default empty implementations of all AbstractDeviceSupport
functions, so there's no need to provide empty ones
2023-01-12 17:11:57 +00:00
Noodlez
3e9a185b88 AsteroidOS: Fix weather forecast
The forecast was off by 1 day
2023-01-12 17:11:50 +00:00
Noodlez
616ec53086 AsteroidOS: Add simple device discovery
This is done by just comparing the names with already existing devices.
This is only a temporary solution until the discovery of the service
UUID works properly
2023-01-12 17:11:45 +00:00
Noodlez
d3d4baedea AsteroidOS: Small code improvements
Removed logging in the DeviceCoordinator, fixed the time setting (day
was off by 1), consolodated many characteristic transactions to one
buidler and queue, and added Find My Device, by just initiating a call.
2023-01-12 17:11:40 +00:00
Noodlez
f7395ec6b2 Initial support for AsteroidOS watches
The watch does not auto-detect through pairing and therefore requires
discovering unsupported devices.
2023-01-12 17:11:36 +00:00
Gordon Williams
f3fa01dfba Bangle.js: Quick tweak to stop us sending bitmaps for common characters that already had good enough equivalents 2023-01-11 13:45:46 +00:00
Arjan Schrijver
845887ddeb Fossil/Skagen Hybrids: Add app/watchface downloading from watch to app manager 2023-01-07 23:07:34 +01:00
Lukas
9ef0e6044c replace GPS_PROVIDER with NETWORK_PROVIDER to retrieve the gps data from the network 2023-01-07 12:09:42 +01:00
José Rebelo
78b73c0fac Amazfit Band 7: Fix coordinator creation 2023-01-06 18:51:09 +00:00
Arjan Schrijver
b1d03e9f7a Clean up duplicated unimplemented methods from device support classes
Moved to AbstractDeviceSupport so each device support class can override them if required. This change helps to keep the code base clean by not requiring every (Device)Support class to implement these methods even when they don't need them.
2023-01-05 22:11:32 +01:00
José Rebelo
17c58d2947 Amazfit GTR 4/GTS 4: Add AGPS Updates 2023-01-05 11:31:51 +00:00
Benjamin Swartley
f1e26aeb8b Fossil/Skagen Hybrids: Fix activity parser
Switch to only saving 0xCE as sample data, mark additional known data

Remove unused updateSample from testing

Add 0xDD handling

Fix byte comparisons

Add SpO2 parsing, still unused. Cleanup

Clean remaining anomalies

Fix order sign blunder filtering out all data

Remove unproductive/improper debugging prints
2023-01-04 19:30:18 -05:00
José Rebelo
20cc75e7d2 Zepp OS: Fix Alipay and WeChat Pay display item and shortcuts
Closes #3014
2023-01-04 11:30:01 +00:00
Arjan Schrijver
d8af8bede0 Fossil/Skagen Hybrids: Allow launching watch apps from app manager 2023-01-02 15:15:48 +01:00
José Rebelo
041aa4faf2 Sony WF-1000XM4: Fix audio codec 2022-12-31 11:55:06 +00:00
José Rebelo
93c40e6457 Sony WF-1000XM4: Fix battery updates +while connected 2022-12-30 18:09:24 +00:00
José Rebelo
ff15fdaa9f Sony LinkBuds S: Initial support 2022-12-30 18:07:18 +00:00
Daniel Dakhno
fed5866f19 Binary sensor: fixed byte overflow bug 2022-12-27 19:45:44 +01:00
Arjan Schrijver
afeeff5293 Fossil Hybrid HR: Fix washed out colors in imported watchfaces
Fixes #2995
2022-12-23 22:45:12 +01:00
Arjan Schrijver
82b3e0d963 Fossil Hybrid HR: Correctly truncate notification body when too long
The original truncation code caused the null termination of the string
to be dropped, leading to several weird issues on the watch, including
empty notification bodies and firmware crashes.
2022-12-22 20:47:00 +01:00
Arjan Schrijver
4470795196 Fossil/Skagen Hybrids: Update known watch app versions 2022-12-18 16:17:22 +01:00
José Rebelo
fe9648dea3 Zepp OS: Allow activity fetch timestamps sent in seconds
Re-applies #2959 after b51328e4f
2022-12-15 22:03:14 +00:00
José Rebelo
b51328e4f2 Huami: Fix payload when setting the time
Fixes #2999
2022-12-15 21:38:06 +00:00
José Rebelo
4a0e67cb30 Add Intent API to trigger activity sync and DB export 2022-12-15 14:17:03 +00:00
Gordon Williams
6d35ca3ec0 fix gbDevice==null errors again, and avoid spamming log with ACTION_DEVICE_CHANGED messages 2022-12-12 16:10:14 +00:00
uli
3986d8c4bc PineTime: Added World Clocks 2022-12-12 15:05:53 +00:00
uli
d3e448ad6f cosmetics to make intent more clear 2022-12-12 15:04:45 +00:00
uli
6cf079e55b adapt HuamiSupport to updated BLE Time handling 2022-12-12 15:04:45 +00:00
uli
5097327234 add local time service to PineTime, fixed standard ble format 2022-12-12 15:04:45 +00:00
musover
c05734ed0f Added forgotten newline to title when it is being repeated 2022-12-12 07:49:26 +00:00
musover
7ed2f90fde Added forgotten null terminator for the title field 2022-12-12 07:49:26 +00:00
musover
4386f321a3 Fixed regression undoing PR #2474, notification content preserved for Amazfit GTS 2 Mini 2022-12-12 07:49:26 +00:00
LukasEdl
abf19f2b6c [Banglejs] Send phone location data to banglejs, which can be used as gps data (#2992)
Since the PR #2961 aswell as #2976, i pushed the changes to this pr.

Original text:

With this PR, the gadgetbridge app sends the current locationd data, obtained from the gps or network provider, to a connected banglejs device as an "gps" event.

The bangle device can use this data instead of the internal gps data. Therefor saving battery energy, since the gps chip is one of the biggest energy consumers.

Furthermore it enables the banglejs device to use the location data, based on the network with which the phone is currently connected. This would be usefull if there is no gps signal.

Updates:

I added a network provider so that it is possible to use the network location. I also overload the start method of GBLocationManager so that it is now possible to select which provider should be used to get the data (currently GPS or Network) and to set a interval to determine how often the update should be run.

For the banglejs device i added a switch to enable the sending of gps data. I also added a setting, to set the interval on how often the gps data is being updated. This allows to throttle the updates of the gps data and therefore saving energy of the smartphone batterie.

To further save energy, the app now requestes the current status of the gps from the banglejs and only sends data, if the gps of the banglejs is turned on.

In the PR #2976 I also moved the settings to the device settings of the banglejs and i moved the logic to the onLocationChanged method of the GBLocationManager.

Co-authored-by: Lukas <lukas.edi@gmx.net>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2992
Co-authored-by: LukasEdl <lukasedl@noreply.codeberg.org>
Co-committed-by: LukasEdl <lukasedl@noreply.codeberg.org>
2022-12-12 07:48:19 +00:00
Gordon Williams
0dd0b2bead Bangle.js flow control. If the Bangle is busy and unable to accept more data, Gadgetbridge will now pause sending until the Bangle is ready for more.
This works by adding the ability to pause the sending of data from the Bluetooth LE queue. While BtLEQueue is modified, unless setPaused(true) is called it behaves exactly as before so shouldn't cause any issues.
2022-12-12 07:43:20 +00:00
Gordon Williams
bb1323dd61 Ensure we automatically convert unrenderable chars the title/description of calendar events 2022-12-12 07:42:22 +00:00
Gordon Williams
e003e0b672 Fix the code that forces a calendar sync on Bangle.js - previously sending "android.intent.action.PROVIDER_CHANGED" didn't work 2022-12-12 07:42:22 +00:00
José Rebelo
a32b756972 Revert "Sony LinkBuds S: Initial support"
This reverts commit f2aaf5aecf.

It looks like the protocol changed, as per the comments in !2990
2022-12-09 21:27:49 +00:00
José Rebelo
21f217b698 Zepp OS: Fix notification icons for work profile apps 2022-12-08 18:14:07 +00:00
José Rebelo
f2aaf5aecf Sony LinkBuds S: Initial support 2022-12-07 20:14:33 +00:00
José Rebelo
07194cd8fb Amazfit GTS 4 Mini: Initial support 2022-12-03 13:27:48 +00:00
José Rebelo
be900f13d8 Zepp OS: Fix NPE when no weather data is available 2022-12-02 21:13:25 +00:00
Daniele Gobbetti
5d6109a4fb No functional changes, only run "Reformat code" 2022-11-27 19:02:52 +01:00
Daniele Gobbetti
7f24ba8ffb Drastic rewrite of discovery activity.
- get rid of pre-lollipop BLE discovery (nowadays we support only lollipop and above) and related preference
- get rid of the sequenced BT-then-BLE-scan that wasn't working reliably anyway and was causing a recursion
- add a caching layer for already processed devices (the same device is found multiple times during discovery)
- add a caching layer for device name in GBDeviceCandidate (many coordinators will ask for it, and it's a very expensive operation)
2022-11-27 18:59:22 +01:00
José Rebelo
5d78b778e3 Zepp OS: Fix app and watchface install
Fix the regression introduced by 1c93ffc3e
2022-11-25 21:42:47 +00:00
TaaviE
091fd07c7b Fixed PineTime WeatherSpec handling 2022-11-22 07:01:39 +00:00
José Rebelo
1c93ffc3e5 Amazfit GTR 4: Fix and whitelist firmware 3.17.0.2 2022-11-22 07:00:41 +00:00
José Rebelo
6c94ecce2e Zepp OS: Fix automatic default values for byte list preferences 2022-11-12 20:32:38 +00:00
gsbhat
5e6480ad19 GTR2 Activate display upon lift only working when scheduled #2252 2022-11-12 22:22:17 +05:30
José Rebelo
8f3ed69ea7 Amazfit GTS 4: Initial support 2022-11-09 17:29:46 +01:00
José Rebelo
2a47dc863a Huami: Allow activity fetch timestamps to be sent in seconds 2022-11-07 19:37:28 +01:00
narektor
2216b6b76a Galaxy Buds2 support (#2853)
Mostly copied from the Buds Pro as those earbuds have a similar feature set and mostly the same protocol.
Co-authored-by: narektor <narektor@noreply.codeberg.org>
Co-committed-by: narektor <narektor@noreply.codeberg.org>
2022-11-07 19:34:41 +01:00
José Rebelo
164c5e52a4 Zepp OS: Add World Clocks 2022-11-07 10:31:41 +01:00
MPeter
4c14dd5f72 fix indentation 2022-11-05 11:26:24 +01:00
MPeter
15803eedea Add a few more comments 2022-11-04 19:17:54 +01:00
MPeter
a0782d318b fix bug where reading files of ZIP archive out of order would not make them available 2022-11-04 19:17:54 +01:00
MPeter
ffcb67636e remove unused variable
forgot to include in previous commit
2022-11-04 19:17:53 +01:00
MPeter
db37222171 temporarily fix version identification 2022-11-04 19:17:52 +01:00
MPeter
96f87cf913 persist metadata in class, move validity check to isValid() function 2022-11-04 19:17:52 +01:00
MPeter
c7841b4947 use ZipFile utility for reading the ZIP file instead of custom logic
merge conflict fix
2022-11-04 19:17:32 +01:00
MPeter
56d087da2f allow ZipFile to accept InputStreams 2022-11-04 19:12:59 +01:00
MPeter
e7bd1620fe Huami2021FirmwareInfo: use ZipFile functions where possible, separate firmware type handling to different functions for readability.
merge conflict fix
2022-11-04 19:12:53 +01:00