1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-10 15:18:23 +02:00
Commit Graph

168 Commits

Author SHA1 Message Date
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
5644ae5925 Display measured hr value in Debug activity + cleanup
Fixes #1320
2018-11-05 23:27:29 +01:00
cpfeiffer
435898ebc9 Move MiBand3-ism to MiBand3Support 2018-11-01 22:05:38 +01:00
cpfeiffer
6d4d92fd88 Live Activity: don't enable notifications every second
This caused the BLE queue to fill up more and more.
2018-09-17 23:02:18 +02: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
b6d68207cb Don't store the live step values in the db 2018-09-11 23:26:51 +02:00
cpfeiffer
50295864f5 Use a custom IntentListener callback instead of LocalBroadcastManager for ble profiles
The issue here is the following:

- we used intents in the generic BleProfile classes to notify about the results of e.g. certain read requests
- we used to send these results asynchronously via LocalBroadcastManager.sendBroadcast(), which always used the main thread for sending
- however, we noticed that reconnecting to devices sometimes failed because the results arrived too late and the next action in the BLE queue lacked the necessary information
- the fix was to use LocalBroadcastManager.setBroadcastSync(), so that the results arrive in time
- this unfortunately meant that they were not sent in the main thread anymore, and especially, this would send all pending intents that were previously queued via sendBroadcast() also in the "wrong" thread (in order to keep the order of events)

The fix is to use a custom IntentListener callback interface for synchronous notifications of ble profile results
*without* also causing other, previously queued intents to be sent.

Fixes #1218
2018-08-18 00:39:14 +02:00
cpfeiffer
f96b10cca0 Avoid potential NPE 2018-08-17 00:19:10 +02:00
Daniele Gobbetti
797a671ccd Amazfit Cor: only send music information when needed 2018-08-08 17:48:23 +02:00
Andreas Shimokawa
da58e22afe Only start MusicPlaybackReceiver if device supports music info
Also block sending music info in HuamiSupport if device does not support it
2018-08-07 12:44:00 +02:00
Daniele Gobbetti
3fac021ff2 Amazfit Cor: implement basic music controls
Play/pause and skip to previous/next song work. The currently playing song
name is shown on the Cor. The track length and progress are now shown as
we don't know how to send these yet.
2018-08-06 23:11:40 +02:00
cpfeiffer
ec0d62f67b If firmwareRevision is null, use softwareRevision 2018-08-06 20:26:39 +02:00
cpfeiffer
f7c9828cc1 Avoid potential NPE 2018-08-06 20:22:10 +02:00
Andreas Shimokawa
fe401bdcf5 Amazfit Cor: allow music control 2018-08-02 22:35:02 +02:00
Andreas Shimokawa
cc7f6d7263 More Huami refactoring
- Rename MiBand2Service to HuamiService
- Move preferences around (Mi Band 2 has its own device specific settings now)
- Fix Cor menu items not syncing immediately in settings
- Try to support settings menu items on Mi Band 3 (buggy, disabled code for now)
2018-08-02 10:55:30 +02:00
Andreas Shimokawa
486d7bdca6 Amazfit Cor: Allow setting menu items
(Also rename/refactor stuff from Mi Band 2 to Huami - still WIP)
2018-08-01 22:56:01 +02:00