1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-29 08:20:16 +02:00
Commit Graph

635 Commits

Author SHA1 Message Date
Arjan Schrijver
eb896dcd57 Fix preference input type enforcement 2023-08-08 08:47:26 +00:00
Arjan Schrijver
b6e252c4c1 Switch UI to Material 3 and support dynamic colors 2023-08-08 08:47:26 +00: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
Johannes Krude
9700fef111 Casio GMW-B5000: separate DeviceType, but still using the CasioGWB5600DeviceSupport 2023-07-22 09:39:56 +00:00
Johannes Krude
7cb060c9fe Casio GW-B5600: initial support 2023-07-22 09:39:56 +00:00
José Rebelo
5c78488e93 Fix emoji transliteration 2023-07-20 21:54:31 +01: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
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
da5f91f05b Huami/Zepp OS: Improve music info stability 2023-07-09 15:16:37 +01:00
José Rebelo
e95c8a3775 Add PAI charts 2023-07-02 16:05:10 +01:00
José Rebelo
531aef61fd Move screenshot encoding to PebbleProtocol 2023-06-14 21:02:27 +01:00
José Rebelo
8ff3ce0477 Zepp OS: Add experimental app management 2023-06-10 23:31:38 +01:00
José Rebelo
42c37c04a0 Zepp OS: Display watchface and app preview on install 2023-06-10 13:34:48 +01:00
Arjan Schrijver
0b241af8e7 Force FlattenToAsciiTransliterator to return only ASCII 2023-06-09 10:13:10 +00: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
José Rebelo
25038d965f Introduce generic TimeSamples for recorded data 2023-05-22 22:15:35 +00: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
7b3fbeb4af Sony WH-1000XM5: Initial support 2023-05-06 16:03:48 +01:00
José Rebelo
880bf9e1b1 Amazfit GTR 3 Pro: Initial support 2023-05-03 20:49:02 +01:00
thirschbuechler
da001544c5 add CroatianTransliterator 2023-03-21 20:00:28 +00:00
Joel Beckmeyer
ed9c746059 fix saving app notification/pebble blacklist preferences on import 2023-03-18 17:54:55 +00: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
roolx
11bcaeb7a8 Add Georgian Transliteration 2023-02-09 21:44:35 +00:00
José Rebelo
134376cbd0 Amazfit T-Rex 2: Initial support 2023-01-23 23:36:57 +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
José Rebelo
78b73c0fac Amazfit Band 7: Fix coordinator creation 2023-01-06 18:51:09 +00:00
José Rebelo
17c58d2947 Amazfit GTR 4/GTS 4: Add AGPS Updates 2023-01-05 11:31:51 +00:00
José Rebelo
ff15fdaa9f Sony LinkBuds S: Initial support 2022-12-30 18:07:18 +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
1c93ffc3e5 Amazfit GTR 4: Fix and whitelist firmware 3.17.0.2 2022-11-22 07:00:41 +00:00
José Rebelo
8f3ed69ea7 Amazfit GTS 4: Initial support 2022-11-09 17:29:46 +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
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
56d087da2f allow ZipFile to accept InputStreams 2022-11-04 19:12:59 +01:00
MPeter
81ef7698f6 ZIP utility class overhaul 2022-11-04 19:09:04 +01:00
MPeter
ee7b76517a refactor zip utility functions 2022-11-04 19:09:04 +01:00
MPeter
ce18a5a6f8 moved ZIP file handling functions to a utility class
merge conflict fix
2022-11-04 19:04:58 +01:00
José Rebelo
addf7ff6a6 Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
José Rebelo
8fdfbfa97c Sony WF-1000XM4: Initial support 2022-10-22 13:14:50 +01:00
José Rebelo
1dca054853 Sony WH-1000XM2: Initial support 2022-10-20 23:48:02 +01:00
José Rebelo
d655f434f8 Zepp OS: Display HR zones and Training Effect in Activity Details 2022-10-06 00:03:24 +02:00
José Rebelo
28a26710d9 Fix calls to unsupported API functions 2022-10-02 16:04:14 +02:00
Andreas Shimokawa
6732bab481 Dirty port tinyECDH to Java, remove ndk dependencies
This has some advantages:
- Less stuff to download for building Gadgetbridge (CI Speedups)
- Shorter build time (no need to build shared library for all supported architectures)
- Easier debugging
- etc :P

What I did:
 - remove all curves except B163 to make porting easier
 - port to java with brain switched off
 - fix the "java has no unsigned" bugs
 - add some helpers to convert int[] to byte[] and back because java has no casts

The result is ugly, no one would write such crappy code from scratch, but I tried to
keep it as close to the C code as possible to prevent bugs. Since I did not know what
2022-09-27 10:51:14 +02:00
vanous
e6411b15ab Add initial support for Shell Racing cars
- adds initial device support
- can control driving forward/back/left/right
- probably could be implemented further:
  - battery reading
  - device name?
  - lights on
  - fast/slow speed mode
2022-09-25 21:39:41 +02:00
thermatk
c24ef44055 Amazfit GTR 3: Initial support (#2900)
Co-authored-by: thermatk <thermatk@noreply.codeberg.org>
Co-committed-by: thermatk <thermatk@noreply.codeberg.org>
2022-09-22 00:56:22 +02:00
Daniel Dakhno
858c53efb8 Utils: added simple Protobuf creator 2022-09-15 01:40:05 +02:00
Andreas Shimokawa
969164ba5d Remove KitKat support 2022-09-10 12:04:16 +02:00
José Rebelo
f915ab5ebd Mi Band 7: Enable app support 2022-09-08 18:20:28 +02:00
sedy89
fc048f8768 Amazfit GTS 3: Initial support (#2871)
Add basic initial support for the Amazfit GTS 3 based on Xiaomi Smart Band 7 support.

What was already tested (other features might work too):

**Implemented features**
    Connection
    Reconnect after Airplane mode
    Set time
    Notifications
        Send to band
        Delete notifications on phone/band when deleted on the other
        Calls
        Custom notification icons
        Handle + ack notification replies from band
    Music (with youtube music)
        Music Info
        Volume
        Music buttons
    Find Phone from band / stop on band when stopped on phone
    Battery Info (request, parse)
    Flash Watchface
    Night mode (mode, schedule)
    Lift wrist (mode, schedule, sensitivity)

(Not) working features might be similar to Miband 7.

Tested on
FW: 7.42.5.1
HW: 0.76.17.4

Co-authored-by: Andreas Sedlmayer <sedlmayer.andreas89@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2871
Co-authored-by: sedy89 <sedy89@noreply.codeberg.org>
Co-committed-by: sedy89 <sedy89@noreply.codeberg.org>
2022-09-05 23:52:01 +02:00
dakhnod
ee207c978f Device FlipperZero: added basic support for the Flipper Zero (#2840)
This PR adds support for the flipper zero device.

It's main purpose currently is to provide an Intent-based API to Tasker and similar apps to play sub-GHz files.

In the future, file management and other features might be useful.

Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2840
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
2022-09-04 23:05:57 +02:00
José Rebelo
9f0169542e Huami: Use system time for GPS timestamps 2022-08-30 08:36:14 +02:00
Daniel Dakhno
e0e1a91dc8 Fossil HR: fixed version calculation 2022-08-27 01:44:41 +02:00
José Rebelo
ba565df088 Xiaomi Smart Band 7: Initial support 2022-08-19 23:13:27 +02:00
Cédric Bellegarde
01a3639199 Add French transliteration 2022-08-17 21:53:51 +02:00
Daniel Dakhno
b29a8cefd2 Binary sensor: initial support for devices using Binary Sensor Service 2022-08-09 18:58:18 +02:00
José Rebelo
5d82030d49 Refactor file logging logic 2022-08-07 23:24:16 +01:00
José Rebelo
6d947a9008 Check the mount state of all external storage directories 2022-08-06 22:27:55 +01:00
vanous
65e054a747 Add another safeguard to prevent unintended slf4j setup 2022-08-05 21:35:24 +02:00
José Rebelo
f7ecb5a867 Allow DeviceService to target a specific device 2022-08-05 21:34:15 +02:00
Arjan Schrijver
44c087b666 Fossil Hybrid HR: Fix watchface background fuzziness due to resizing 2022-07-31 22:53:32 +02:00
Arjan Schrijver
7d5fe20b55 Fossil Hybrid HR: Add optional circle backgrounds to widgets 2022-07-25 14:34:41 +02:00
José Rebelo
152f19575f Make calendar blacklist configurable per device 2022-07-05 19:58:21 +02:00
Daniel Dakhno
62f77ef8d0 ControlCenter: added folders to ControlCenter 2022-06-28 14:01:51 +02:00
Arjan Schrijver
48212d4185 Fossil Hybrid HR: Add watchface preview images in the app manager 2022-06-17 14:45:10 +02:00
José Rebelo
33d433d206 Make transliteration configurable per-language 2022-06-15 18:40:28 +02:00
dakhnod
4a8523f790 multi-device-support (#2526)
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>
2022-06-14 18:05:41 +02:00
vanous
8bfe37e61f Handle one shot alarm for Fossil watch 2022-06-12 08:50:46 +02:00
José Rebelo
b07cd54468 Mi Band 5: Send GPS location to band during workout 2022-06-09 10:32:26 +02:00
vanous
4db2877a91 Widget and SleepAlarmWidget: modify for multidevice support 2022-05-28 14:57:01 +02:00
vanous
948db604e5 Add support for Galaxy Buds Pro
- add generic coordinator and settings customizer for Galaxy Buds
- add Prefs to the DeviceSpecificSettingsCustomizer
- edit Changelog
2022-05-17 22:27:40 +02:00
Quang Ngô
b46b1278b3 Add support for Sony WF-1000XM3 2022-05-16 17:50:31 +07:00
José Rebelo
1092e1b10a Unset notification color for Android 12+ 2022-05-01 23:06:32 +02:00
Andreas Shimokawa
b62357dfe2 Mi Band 6: Sync alarms set on the watch like on Amazfit Bip U and others
This adds code to decrypt chunked protocol replies for configuration data.
Also some (disabled) code for SMS reply.
2022-02-02 12:57:25 +01:00
Andreas Shimokawa
406f775f76 Amazfit Pop/Pop Pro: Seperate device from Bip U/Bip U Pro
This really seems to be the same device, but it does have a different firmware
and a different bluetooth name.

Do this to prevent cross flashing - which might actually be okay but we do not know.
2022-01-18 21:15:12 +01:00
MedusasSphinx
f3a491496e Transliterate "ı" 2022-01-12 13:55:25 +01:00
José Rebelo
d23b0a5b88 Sony WH-1000XM4: Initial Support 2022-01-12 10:36:07 +01:00
vanous
7cf562c8e6 Refactor formatting of distance strings
- localizing number format
- allows translation of distance units
- refactor
2021-12-30 07:55:20 +01:00
dakhnod
504b552f0c device-vesc (#2491)
Adds Support for BLDC controller VESC connected to a BLE serial device like an HM10.

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2491
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
2021-12-27 15:47:10 +01:00
dakhnod
b0ed617072 device-bose-qc35 (#2520)
This PR adds not only the device Bose QC35,
it also adds the following autop-reconnect feature:
When the headphones are turned on, the initiate a connection with the phone.
With this change, GB is notified about said change, and tries to establish a connection to the newly connected device, if the appropriate device setting is set.

The QC35 headpones always have NC turned on after boot, thus the main feature of this implementation is to turn off NC as soon as the headphones are turned on and connected to the phone.

I am open for discussion regarding the implementation, but this seems like a good first proposal.

What is missing is the ability to connect to multiple devices, since in many cases headphones can be connected to the watch simultaniously to a smartwatch or other gadget.

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2520
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
2021-12-27 15:37:04 +01:00
José Rebelo
c4874de11a Sony WF-SP800N: Initial Support 2021-12-26 19:17:21 +01:00
Daniel Dakhno
e889796671 added util method to Version 2021-12-26 17:58:47 +01:00
José Rebelo
33b5a6de38 Sony WH-1000XM3: Read information from device 2021-12-23 11:39:26 +01:00
José Rebelo
f8e5b88231 Sony WH-1000XM3: Abstract common Sony Headphones logic 2021-11-20 21:26:51 +01:00
Damien Gaignon
ed47a0fcf7 Change CRC16 method
Be able to use a custom crc value for initialization.
Keeping compatibility with previous method.
2021-11-13 21:43:05 +01:00
vanous
fcb91fd544 Add support for Galaxy Buds Live 2021-11-12 18:01:50 +01:00
José Rebelo
bf5eebd411 Sony WH-1000XM3: Initial Support 2021-11-06 23:43:31 +00:00
vanous
a7fbda5fe1 Multi-battery: further improvements:
- add new icons
- ensure correct default icon
- modify Battery Info activity
2021-11-02 21:15:25 +01:00
vanous
3609af3a18 Add batteryConfig
- clarify battery index
- icon and label settings
2021-11-02 21:15:25 +01:00