1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-21 04:20:27 +02:00
Commit Graph

269 Commits

Author SHA1 Message Date
Damien Gaignon
be575af314 Add BTBR service 2023-06-13 12:06:13 +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
152f19575f Make calendar blacklist configurable per device 2022-07-05 19:58:21 +02:00
Toby Murray
203176a01e Update GATT characteristic list
The current GATT characteristic list mentions it was up to date as of populated 2015-09-28. In the last 6 years, significantly more characteristics have been added to the Bluetooth spec. While it's not necessary to have all these constants available in Gadgetbridge, it's useful while implementing new features for a device or adding support for a new device

This was retrieved from https://btprodspecificationrefs.blob.core.windows.net/assigned-values/16-bit%20UUID%20Numbers%20Document.pdf. The GATT characteristics were parsed from that PDF and converted to constants with names via:

```
String description = uuid.description.trim().toUpperCase().replace(' ', '_').replace('-', '_');
System.out.println("public static final UUID UUID_CHARACTERISTIC_" + description + " = UUID.fromString((String.format(AbstractBTLEDeviceSupport.BASE_UUID, \"" + uuid.uuid + "\")));");
```
2021-01-18 19:38:16 -05:00
License Bot
1b5402dcb4 update license headers 2021-01-10 23:38:13 +01:00
TaaviE
2b889a2e4c Improved documentation in UpdateFirmwareOperation, it's not NotificationListener it's handleNotificatioNotif 2020-10-11 19:16:31 +03:00
TaaviE
3ad1412a1d Delegated error handling properly to the function that creates FetchActivityOperation 2020-07-28 08:11:50 +02:00
TaaviE
7ea7fadd60 Made Mi Band activity fetching not crash the application 2020-07-27 17:55:16 +03:00
Dmitry Markin
10c9b07c69 Control alarm snooze mode on MiBand2 2020-01-12 12:02:04 +03:00
License Bot
d6fa5d0dd5 Update license headers 2020-01-09 10:44:32 +01:00
Andreas Shimokawa
72ffbca2ff Make "reserve alarm for calender" per-device and only allow for Mi Band 1/2
This avoids a lot of bugs and confision regarding alarms
2019-12-14 23:48:02 +01:00
Andreas Shimokawa
89c7066d32 Widget: Only signal new data only when syncing activity data (not on fetching logs etc), do the same for Mi Band 1 2019-09-16 22:25:58 +02:00
Andreas Shimokawa
16090f0e21 Move fake device offset to Mi Band 1 preferences, remove support for other devices
Reasons for removal:
- I doubt we honored the offset correctly for new features anyway that are available on newer devices
- Newer devices have a display always displaying the wrong time
2019-06-05 14:11:44 +02:00
Andreas Shimokawa
b6a015c18b move low-latency setting for Mi Band to per-device settings (only for Mi Band 1) 2019-06-05 12:48:33 +02:00
License Bot
9aadb2f2fd Update license headers 2019-04-21 18:53:10 +02:00
Sebastian Kranz
6a04c78b0e Merge branch 'master' of https://github.com/Freeyourgadget/Gadgetbridge into zetime 2019-02-20 14:24:59 +01:00
Sebastian Kranz
a7553188f9 Reading the device preferences from the watch and set them in the ZeTime menu. 2019-02-20 14:09:21 +01:00
License Bot
beedb653e6 Update license headers 2019-02-13 20:43:31 +01:00
Daniele Gobbetti
75d3dffb14 Migrate to androidx support libraries and bump compile SDK version
"Optimize imports" has been run on all source files, there might be
unrelated changes, but these should be harmless.
2019-01-26 16:00:56 +01:00
cpfeiffer
903b50c2c5 Improved DB-based alarms
- got rid of GBAlarm
- added migration for prefs-based alarms
- various cleanups
2019-01-07 01:15:49 +01:00
Andreas Shimokawa
b020d59f54 Implement factory reset feature in debug activity
Implemented for Mi Band 1/2/3, Cor, Bip

Could be implemented for Pebble by deleting all blobdbs etc

Related to #109
2018-12-16 16:06:12 +01:00
Andreas Shimokawa
740cf103f6 Initial support for per-device alarms and raising the number of available alarms
TODO:
- Fix alarm widget (how can we get the deviceId?)
- Get rid of GBAlarm in favour of DAO generated Alarm class
- Find better defaults
- Bonus: migrate old preferece based shared settings
2018-11-24 12:16:47 +01:00
cpfeiffer
934f36f45a Use ActivityUser.defaultUserStepsGoal instead of hardcoded values
ActivityUser has room for improvement, though.
2018-09-16 20:49:00 +02:00
cpfeiffer
add9be5ff6 Another place to handle possible negative steps values 2018-09-11 23:24:27 +02:00
Daniele Gobbetti
2a30e9486c Reduce the amount of lines in the logcat for binary dumps
Concatenate the binary values instead of logging one byte per line.
2018-06-23 11:15:03 +02:00
Daniele Gobbetti
f99895da0c Remove activity transfer toast, add title to the transfer notification
Also create a separate channel that allows "muting" transfer notifications
on android oreo and above.
2018-06-19 22:03:49 +02:00
Andreas Shimokawa
29a05f1d8f refactor onFetchActivityData() into onFetchRecordedData(dataTypes) to make it more generic
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...
2018-03-31 16:21:25 +02:00
License Bot
238bacde9f Update license headers 2018-02-26 14:27:33 +01:00
Andreas Shimokawa
01a5d862a0 Mi Band 1S: fix regression with firmware 4.16.4.22 and whitelist 4.16.11.15 2017-12-29 00:41:21 +01:00
Andreas Shimokawa
dc51714d01 Mi Band: Support activity fetching in later firmwares (needs testing)
Based on the profile version which is 0x2000700 for both the bug reporter on a Mi Band 1 and for me on a Mi Band 1s
this either expects packets with length 20 (old firmwares) or 16 for HR enabled bands and 18 for non-HR enabled bands (new firmwares)

We check for profile version >=0x02000000 which is guessed, that needs confirmation for older firmwares and untested ones

Fixes #915
2017-12-28 01:07:25 +01:00
Andreas Shimokawa
1e324acd65 Mi Band 2/Bip/Cor: Whole day HR Measurement 2017-11-11 00:04:51 +01:00
Andreas Shimokawa
f07b77f903 Mi Band 2: support app icons and textual notifications for more apps 2017-10-22 00:02:36 +02:00
Daniele Gobbetti
bb962001a5 Merge branch 'master' into background-javascript
# Conflicts:
#	app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java
2017-09-03 16:49:27 +02:00
cpfeiffer
c468e7f521 Mi Bands+Bip: when an operation finishes, unset the gatt callback on the BtLEQeue
Otherwise it will continue to receive events until another transaction is being executed.
2017-09-02 22:49:58 +02:00
Andreas Shimokawa
74652397dd Merge branch 'master' into background-javascript 2017-08-28 00:35:28 +02:00
License Bot
15f4ce2869 Update license headers 2017-08-25 11:25:01 +02:00
Andreas Shimokawa
ceec76b4f6 Pebble: preparations for js appmessage ack/nack callbacks 2017-08-01 00:03:28 +02:00
freezed-or-frozen
9b5c1b91c0 modify MiBandSUpport.handleSensorData() to convert raw values in acceleration values 2017-05-30 23:11:59 +02:00
cpfeiffer
16af0724dd Replace method pair() with connectFirstTime()
Should help with #642 for hplus which did not implement pair()
2017-04-12 21:35:40 +02:00
cpfeiffer
da9742fd67 Mi1: Attempt to recognize Mi1 model with hwVersion = 8
Closes #364
2017-03-20 23:25:42 +01:00
cpfeiffer
b97674ba85 Mi2: Display realtime steps in Live Activity #428
Thanks for the hint!
2017-03-20 23:01:28 +01:00
cpfeiffer
17ecee0cab Mi2: initial support for text notifications and icons
See #560
2017-03-14 00:45:54 +01:00
Andreas Shimokawa
fe870ebc77 Move step goal generic, show proper sleep goal in weekly sleep goal
It is now also accessible via "About You" but still remains in the Mi Band Settings
(because it has to be setup initially by a "wizard")
2017-03-11 11:34:03 +01:00
License Bot
e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
cpfeiffer
c56b655b48 Mi2: send text notification for mi2 only, not mi1a 2017-03-05 10:43:19 +01:00
cpfeiffer
4419200624 Mi2: Initial support for textual notifications #560 2017-03-03 20:12:43 +01:00
cpfeiffer
4f0674d038 Support for alarm clock notifications for Mi1 + Mi2 #538
No support for Pebble and HPlus for now.

Atm relies on the CM deskclock alarm, which nicely broadcasts
events about the current alarm. See
https://github.com/CyanogenMod/android_packages_apps_DeskClock.git
2017-02-07 23:49:10 +01:00
Andreas Shimokawa
3644d5e7a6 Pebble: remove notifications when dismissed on the phone (#326)
Most of the code is generic, so it could be implemented by other devices.
I dont know what happens if multiple messages arrive in the same notification.
So, this is experimental.
2017-01-09 16:33:00 +01:00
Andreas Shimokawa
266c6b8817 Pebble: send weather to Pebble when we get notified by weather notification 2016-12-31 15:56:05 +01:00
cpfeiffer
da494cde7b Handle live activity for Mi2 and Mi1 in the same way #448
Realtime samples now use ActivitySample.NOT_MEASURED for unknown or
invalid values.
2016-12-26 12:51:12 +01:00