1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-24 07:38:45 +02:00
Commit Graph

271 Commits

Author SHA1 Message Date
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
cpfeiffer
8719cadc43 Mi Band: fix live activity messing up stepcount #448
live samples now report relative steps, not absolute to the current
day's stepcount.

Also live samples' steps should NOT be added to the database since
they are already counted in the regular stepcount.
2016-12-26 01:38:20 +01:00
cpfeiffer
305bd7600c Fix current realtime steps calculations #450
timestamp is already in seconds instead of milliseconds

Also: port to REALTIME_SAMPLES
2016-12-26 00:23:02 +01:00
cpfeiffer
999d3e3252 Mi1: Attempt at throttling notifications during sync #438 2016-12-25 23:27:56 +01:00
cpfeiffer
dd48869fa5 Mi2: move Miband2Support into the package it belongs 2016-12-14 00:28:35 +01:00
cpfeiffer
c69889d177 Simplified + fixed ArrayUtils.equals() + added lots of testcases 2016-12-11 23:30:20 +01:00
cpfeiffer
40354f8f5a Some @Override 2016-12-11 21:31:27 +01:00
cpfeiffer
6dfc895303 Mi2: Initial work on firmware update #427 2016-12-11 02:11:58 +01:00
cpfeiffer
83ad2a9bd9 Mi 2: rename characteristic 00000003 to "CONFIGURATION" 2016-12-11 02:11:58 +01:00
Andreas Shimokawa
17b581022b optimize imports 2016-12-09 20:14:17 +01:00
cpfeiffer
da297ecd8b Fix + cleanup time setting and calendar sending #441 2016-12-01 22:51:08 +01:00
cpfeiffer
09ff95eb34 Support for continuous hr readings (live activity) #323 2016-11-29 23:25:11 +01:00
cpfeiffer
49acde118d Do not log heartrate separately during miband 1s sync 2016-11-29 23:25:11 +01:00
cpfeiffer
3fdfb7d172 Mi2: Support for setting the fitness goal (steps) 2016-11-24 21:58:32 +01:00
cpfeiffer
82cd06f4c1 Mi2: WIP: initial support for activity data
(#323)
2016-11-22 00:05:41 +01:00
cpfeiffer
d8145a52f9 Activate the display when lifting the wrist #323
Configurable, defaults to true
2016-11-13 21:47:54 +01:00
cpfeiffer
d89899557c Mi2: Add config option to configure date/time display
(added a new EventHandler method to set a specific configuration option)
2016-11-13 20:47:24 +01:00
cpfeiffer
3cc8d887ca Mi2: Initial support for wear location, hr during sleep and date format #323
- wear location from prefs is sent to the band
- hr measurement during sleep is sent to the band
- date format is sent to the band (date+time or just time)
  (TODO: needs preference option)
2016-11-13 01:44:52 +01:00
cpfeiffer
3b474bb5a9 Move another notify registration to after initialization #408 2016-11-08 22:55:31 +01:00
cpfeiffer
55f036c104 Move heart rate notification enamblement to after authentication
Might fix #408 and #425
2016-11-04 22:11:07 +01:00
cpfeiffer
0076bbf572 Remove all Mi2 DeviceInfo stuff -- they're not used together #365
This might fix firmware downgrading on certain Mi1A devices
with hw revision 8
2016-10-30 23:04:21 +01:00
cpfeiffer
cea5f5fa36 Remove duplicate case here as well 2016-10-29 00:01:56 +02:00
cpfeiffer
3db9748136 Mi2: Attempt to support non-repetitive alarms #323 2016-10-28 23:18:10 +02:00
cpfeiffer
1352403089 Mi2: Allow for disabling alarms #323 2016-10-28 22:26:07 +02:00
atkyritsis
45cf4e5396 Removed duplicate if statement. 2016-10-27 18:44:27 +02:00
cpfeiffer
de46555e37 Mi2: display heart rate result from Debug screen as a toast #323 2016-10-24 00:23:59 +02:00
cpfeiffer
b20a9c9ccc Some initial hacky support for hr readings (Debug activity only)
My Mi2 stopped reporting hr values a while ago though, even on-device.
2016-10-23 23:53:48 +02:00
cpfeiffer
17b70a1b82 Support for more than one alarm #323
Smart alarms not supported yet.
2016-10-23 23:05:54 +02:00
cpfeiffer
3a12ffd42d Mi2: Fix for alarm enablement. Was too late, apparently. 2016-10-23 22:38:57 +02:00
cpfeiffer
ee24443b6a Make it really clear, that only the first alarm works #323 2016-10-21 01:01:30 +02:00
cpfeiffer
15954d4561 Initial support for alarms (one, atm) #323
(repetitinos not tested yet)
2016-10-21 00:50:41 +02:00
cpfeiffer
839da4f06a Shuffle some logging things around 2016-10-21 00:50:41 +02:00
cpfeiffer
c87d08bf4b Small refactoring for initial support for Mi2 Alarms #323 2016-10-21 00:50:41 +02:00
Daniele Gobbetti
21fc5c7498 Integrate Daniele's live-sensor-data support 2016-10-11 23:13:40 +02:00
cpfeiffer
713989ef38 Add event "test new function" for the debug screen 2016-10-11 23:06:59 +02:00
cpfeiffer
e7c0afa603 Cleanup onNotification() 2016-10-11 21:18:43 +02:00
Andreas Shimokawa
a094f0cc76 Mi Band: for vibration settings, group navication types (email, sms, chat, social network, navigation) 2016-10-11 15:20:55 +02:00
Andreas Shimokawa
cd195a5969 map more apps to notification types (icons and colors on the pebble) 2016-10-11 11:54:52 +02:00
cpfeiffer
92c629c351 Ranem NotificationType.UNDEFINED to UNKNOWN 2016-10-10 23:06:44 +02:00
cpfeiffer
62828e5158 Remove ORIGIN_ notification constants, clean up
- MI preferences now use NotificationType.getFixedName() for preference
  keys
2016-10-10 22:45:26 +02:00
cpfeiffer
db034a246c Add 'Try' button to vibration profile preferences, closes #405 2016-10-09 00:10:53 +02:00
cpfeiffer
9e32e7d0d3 Remove some Mi2 testing code, only use Mild Alerts for Mi1 (fow now) 2016-10-08 22:43:41 +02:00
cpfeiffer
125c0092cb Storage and improved way of realtime data (hr, steps so far) 2016-10-08 01:35:58 +02:00
cpfeiffer
713e9426b9 Re-enable UUID_PAIR again, when keeping data on device is configured) #250
This should fix data sharing with Mi Fit
2016-10-05 23:01:35 +02:00
cpfeiffer
f23ed5ce69 Mi2: declare to always support hr #323 2016-10-03 21:17:58 +02:00
cpfeiffer
5bdc7933b3 Somewhat hacky support for Mi2 notification icons #323 2016-10-02 23:04:59 +02:00
cpfeiffer
1bd919ccaa For a start, we can reuse the alert notification from Mi 1 #323
So vibration works :-)
2016-09-20 23:41:50 +02:00
cpfeiffer
ccdb843b6e Improved Mi Band 2 support #323
- connecting works and is stable
- firmware and hardware version is displayed
- time is set
2016-09-20 23:12:17 +02:00
Andreas Shimokawa
6a18d90fee Vibratissimo: add simple and buggy activity with a slider for vibration control
Also includes some fixes and "find your device" support ;)
2016-09-20 20:28:52 +02:00
JohnnySun
53d4681763 Optimize Imports 2016-09-13 23:53:35 +08:00
JohnnySun
19fbe5719c When miband2 auth success, let application show miband status is connected 2016-09-13 23:50:35 +08:00
JohnnySun
08f2b0eb7c fix somebug and rewirte the auth process 2016-09-13 18:15:03 +08:00
JohnnySun
90d730bdc8 Added miband2 connection support 2016-09-13 01:28:50 +08:00
cpfeiffer
e555066ffc Fix firmware2 not being set 2016-09-11 21:15:36 +02:00
cpfeiffer
c59553c9c9 Rename GBDevice#hardwareVersion to model
(e.g. while DeviceType is "PEBBLE" in general, the model
might specify a Pebble Time or Time Steel.
2016-08-26 20:57:59 +02:00
Andreas Shimokawa
ce8af615d1 Merge branch 'composite-key-dao' 2016-08-18 20:35:56 +02:00
cpfeiffer
fbf06c1fe3 Separate coordinator and support instances for Mi1 and Mi2 #323
+ Some more testing stuff for Mi2
2016-08-17 00:53:16 +02:00
Andreas Shimokawa
69933c5e92 db refactoring: depend on latest -fyg patched greendao, change column order again (primary keys first), remove index from pebble health overlay also 2016-08-14 22:33:41 +02:00
Andreas Shimokawa
eb962c65f0 work towards composite keys
(builds but does not run because greendao generates wrong table creation code - we need to fix that)
2016-08-13 01:24:43 +02:00
cpfeiffer
b43b7948b0 Let GallCallback return boolean values in order to mark an event as "consumed"
(to avoid dispatching the event to further listeners (ble profiles)
2016-07-28 23:04:37 +02:00
cpfeiffer
f5ba09ebe0 Some babysteps towards miband2 support #323
Start to implement standard BLE profiles/services.
2016-07-25 00:00:22 +02:00
cpfeiffer
7b26986ab0 Fix for #349
We must not use UUID_CHAR_PAIR anymore. This prevents connecting
without being bonded. Connecting when bonded still works.

As without bonding, ControlCenter would not display the device anymore,
we have to re-install the "remember last connected device" in the
preferences thing.
2016-07-15 00:13:49 +02:00
cpfeiffer
367091587f No more 0x8 in the logs
It's the confirmation that setting the latency succeeded.
2016-07-14 20:15:54 +02:00
cpfeiffer
91d1cea51f Avoid potential NPEs 2016-07-04 22:40:24 +02:00
cpfeiffer
8b24e098ea Set sampleProvider to avoid NPEs 2016-07-01 00:22:54 +02:00
cpfeiffer
f65afa64d9 log raw activity data from mi band, closes #341
Hopefully aids in deciphering activity kinds.
2016-06-28 23:23:29 +02:00
cpfeiffer
f0da25c49b Fix activity fetching getting stuck when double tapping #333 2016-06-28 23:07:24 +02:00
cpfeiffer
e70a2290c3 sampleproviders now return device specific data #206 2016-06-27 20:43:48 +02:00
Andreas Shimokawa
b77f3ad3bf Pebble: Implement call dismissal with canned messages
This also moved the canned replies setting to pebble settings
(we will change that if we have another device supporting this)
2016-06-24 10:25:08 +02:00
cpfeiffer
a01507a924 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-14 20:14:04 +02:00
Andreas Shimokawa
98999993e5 Pebble: In AppManager allow moving apps on the device to the top (context menu) 2016-06-12 01:20:12 +02:00
Steffen Liebergeld
e386d6da43 Add onSetMusicState(MusicStateSpec stateSpec)
This commit contains the infrastructure needed for the
NotificationHandler to send music state information to the device. That
is, it introduces a call onSetMusicState(MusicStateSpec stateSpec), that
in turn sets up an intent to the service, which will then call the
encodeSetMusicState() function of the device. encodeSetMusicState is
available for pebble only. There are empty stubs for other devices.
2016-06-08 20:31:48 +02:00
cpfeiffer
3b87966fe9 Merge branch 'master' into db-refactoring 2016-06-06 22:16:40 +02:00
cpfeiffer
2b6ee41970 Add logging of heartrate values #318 2016-06-05 22:37:42 +02:00
cpfeiffer
ca26e27c60 Basic support for Mi Band 2 #323, untested 2016-06-05 22:31:07 +02:00
cpfeiffer
2e6536555b Fix previous commit (compile!) 2016-05-31 22:56:22 +02:00
cpfeiffer
9a106667d2 Setting the wear location appears to fail for amazfit #274
So as a test, disable that for amazfit. Let's see what happens
next.
2016-05-31 22:33:38 +02:00
Andreas Shimokawa
cb1ec5dccb Make calendar event type byte instead of int
Now the UUID will be constructed like this:

High 64bit 0x4742474200 | type
Low 64bit id
2016-05-24 13:11:57 +02:00
Andreas Shimokawa
4bd578ebea Pebble: send sunrise/sunset to watch for today and tomorrow, also delete previous timeline pins 2016-05-16 23:37:40 +02:00
cpfeiffer
876bdac918 More WIP: remove now unused code, better use of generics 2016-05-16 23:36:54 +02:00
cpfeiffer
40a376bbd0 Merge branch 'master' into db-refactoring 2016-05-16 23:01:16 +02:00
cpfeiffer
3e0bc16741 More WIP, but we're getting closer
current state:
- storing samples works (tested only mi band)
- charts work
2016-05-16 23:00:04 +02:00
Andreas Shimokawa
017f650b3f Pebble: send sunrine and sunset pins to timeline when setting time in debug menu
This is just a test and it will leak your timeline data, since we never delete it.
Also this adds some rough infrastructure for calendar events.
2016-05-16 17:30:11 +02:00
cpfeiffer
3a1f91b5a8 Default to low latency mode #287
Tested with Mi1A and Mi1S -- works fine and faster than without
low-latency mode.
2016-05-15 00:22:53 +02:00
cpfeiffer
5963843216 Experimental support for #274 (untested yet) 2016-05-15 00:15:31 +02:00
cpfeiffer
8ca821ab8a More WIP on db refactoring 2016-05-13 23:47:47 +02:00
cpfeiffer
d0c8483d92 More WIP 2016-05-08 23:49:15 +02:00
Andreas Shimokawa
65a95366f4 Mi Band: Allow setting low-latency FW update mode in Mi Band development settings 2016-05-04 13:24:32 +02:00
cpfeiffer
e35ce978bd Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
cpfeiffer
0704915a88 Move parsing of preference strings to int values to Prefs 2016-04-25 23:39:03 +02:00
cpfeiffer
78bf516897 Disabling sleep measurement for continuous measurement is not necessary
Looks like they don't interfere, after all. #178
2016-04-12 23:25:12 +02:00
cpfeiffer
f15a97d994 Initial live heartrate measurement in the live activity tab #178 2016-04-12 23:12:50 +02:00
Andreas Shimokawa
a15b327ff1 Refactoring: get rid of ServiceCommand, use new CallSpec and MusicSpec to pass Call and Music info 2016-04-04 20:08:34 +02:00
cpfeiffer
59c3970008 Reuse characteristic objects #234 2016-04-03 23:01:58 +02:00
cpfeiffer
b129844169 Small fixes to PR 273 #232
- dynamically toggle hr sleep support when preference changes
- check hr support dynaically after device info is available to avoid false error message
2016-04-03 22:38:06 +02:00
cpfeiffer
7cda9f1923 Merge branch 'computerlyrik-heartrate-sleep-support' 2016-04-03 21:46:29 +02:00
cpfeiffer
804a85d31f Small refactoring of BtLE actions 2016-04-03 21:46:24 +02:00
cpfeiffer
b54fe53cd5 Merge branch 'heartrate-sleep-support' of https://github.com/computerlyrik/Gadgetbridge into computerlyrik-heartrate-sleep-support 2016-04-03 21:02:45 +02:00
cpfeiffer
a4919789ca Add some progress to firmware updating #271 #234
Also: remove the low latency mode for firmware update,
because my Mi1S simply disconnects then.

Still missing in the view: device disconnects
2016-04-03 00:50:45 +02:00