Commit Graph

76 Commits (58d90c2a662760cfad7e4bb46e7a79fa8b29c40a)

Author SHA1 Message Date
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 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 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 2d10c11005 Log the length of the bytes written 2016-04-02 22:35:37 +02:00
Christian Fischer f2de21a664 test if heartrate is supported before writing preferences 2016-04-02 16:11:51 +02:00
Christian Fischer 20aa7d9ad9 add preference to set hartrate sleep detection 2016-04-02 16:09:30 +02:00
cpfeiffer 6f97b8c1e5 Log the date that we receive from the Mi Band 2016-03-31 21:54:09 +02:00
Andreas Shimokawa adfef3db42 Prepare code for more music metadata (duration, track count, current track number)
Oh and format code
2016-03-27 17:45:44 +02:00
cpfeiffer 8165751e57 Refactoring to test the double firmware update procedure #234
(while performing the same, known to be working firmware update for Mi1A)

Result: double firmware update procedure works on Mi1A.

Also updated FirmwareTest. Perform all tests not only in the test itself,
but also at runtime before doing the actual update.

Further:
- fix setting of firmwareInfoSent state variable, which prevented installation
  of the section firmware
- make one string translatable
2016-03-25 23:45:27 +01:00
cpfeiffer 3714ec82da Extracted String "HR: ", (= Heart Rate Firmware Version) 2016-03-24 22:23:16 +01:00
cpfeiffer 89eddb13b0 Fixed connection issues by reading the date from the band #249 2016-03-24 22:10:23 +01:00
cpfeiffer e5b0afb916 Enable low latency during activity sync 2016-03-24 21:26:51 +01:00
cpfeiffer 11ac01f0e8 Set low latency mode during initialization #249
This appears to fix the initialization getting stuck sometimes, e.g.
after turning on bluetooth and then connecting.

The band incidentally sends 0x8 when it's stuck (won't accept the UUID_PAIR
request).
2016-03-23 22:50:42 +01:00
Andreas Shimokawa 4be1926459 reformat code though Android Studio 2016-03-20 15:00:05 +01:00
cpfeiffer e26e6d7b24 Display HR firmware version
Hide fw,hw,hr versions by default and show them on demand with an info
button.
2016-03-16 00:27:32 +01:00
Andreas Shimokawa 88982a6174 Merge pull request #235 from Freeyourgadget/feature-configuration
Use external browser for configuring pebble apps
2016-03-08 10:41:46 +01:00
cpfeiffer be012eca8d For Mi Band 1A (fw 5.15.7.14) we get 0xa for auth success #180 2016-03-07 21:43:45 +01:00
cpfeiffer 50dd7f5eba Better check for heartrate support on non-heartrate devices 2016-03-07 21:36:31 +01:00
Andreas Shimokawa 2a7f9226a0 Pebble: send configuration to watch
TODO: handle booleans
2016-03-03 14:23:17 +01:00
cpfeiffer cbe73f71a1 Fix some typos (thanks!) #178 2016-02-29 22:08:34 +01:00
Andreas Shimokawa ed85fd5011 convert byte and short values related to activity tracking to int
This avoids a lot of problems because java
- does not know unsigned values
- jvm and dalvic do not internally support byte and short
- sqlite does not know them either
2016-02-29 20:54:39 +01:00
cpfeiffer d7822d07a6 Show the measured heart rate as a Toast, for now #178 2016-02-27 23:27:15 +01:00
cpfeiffer 3ff31cd73b Disable heartrate in charts fow now, fix notification for manual hr 2016-02-27 23:18:44 +01:00
cpfeiffer ac8d7bee5f Only do heart rate stuff when supported #178 2016-02-27 11:23:55 +01:00
cpfeiffer de6f898fef Some more fixes regarding heart rate measurement #178 2016-02-27 11:18:16 +01:00
Kasha 9e636d66f6 Initial heart rate support by KashaMalaga #178
(removed unrelated Android M fixes and squashed commits)
2016-02-27 00:05:06 +01:00
cpfeiffer c86365ee2e Some more Mi Band pairing improvements #180
- listen to notifications early -- the band then actually tells us that
  authentication is required
- check for this after sending user info
- add authentication states to GBDevice
- workaround for event problems in pairing activity (delivered although
  already unregistered)
- BtLEQueue now deals with gatt events coming *before* connectGatt()
  actually returned (namely the connection event)
2016-02-13 00:15:16 +01:00
Daniele Gobbetti f9122bc674 send the calendar events each time the time is sent to miband, until we have a common strategy (e.g. EventHandler). 2015-12-29 10:01:32 +01:00
Daniele Gobbetti 1d9e1d7caf Fix possible race condition when availableSlots == 3
(There are two difficult things...)
2015-12-29 09:18:02 +01:00
danielegobbetti 9fb2e1620e Rename misnamed file. 2015-12-19 14:36:28 +01:00
danielegobbetti 89ef950c62 Add the feature to changelog.
Fix max index for alarms on miband.
2015-12-18 20:30:09 +01:00
danielegobbetti 5fb8c7bed8 Use the right column for sorting upcoming events.
Plus add forgotten getQueue
2015-12-18 18:49:29 +01:00
Daniele Gobbetti 036e92ee64 Implement sending the upcoming events to the miband.
The reserved alarm slots are used for storing the upcoming events.

The method is not yet called anywhere.
2015-12-17 18:02:21 +01:00
cpfeiffer 854a7ee1ac Avoid NPE when DeviceInfo is null
(when a notification comes in while we're connected, but not initialized yet)
2015-12-09 17:55:46 +01:00
cpfeiffer 365ce61cb6 Support for firmware upgrade/downgrade on Mi 1A.
I hope I didn't break firmware upgrades on some Mi 1 models
other than mine (my hardware revision is 2).

Upgrades for Mi 1S are currently disabled, we need some brave
souls who can help us test this.

Closes #173
Also see: #169
2015-12-07 01:14:06 +01:00
cpfeiffer bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer 81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer c350f04fa9 Make "Locate device" work with newer firmware and MI1A. (#136)
Separate the different notification logic into distinct strategy classes.
2015-10-22 00:53:27 +02:00
cpfeiffer aa5749cd40 Some improvements to live activity.
Still rather inaccurate due to missing timing information.
2015-10-21 00:36:18 +02:00
cpfeiffer 4e0fed8857 Improvements to how and when alarms are sent to the device
They are now sent whenever the Alarms activity is finished.
Display "All alarms disabled" when no alarm is enabled.

Unrelated: pass exceptions to GB.toast() where applicable.
2015-10-18 23:52:59 +02:00
cpfeiffer 7a44ea9596 Small comment 2015-10-18 21:33:07 +02:00
Sergey Trofimov d57c6166b9 Fix pairing with MI1A 2015-10-18 21:54:22 +03:00
cpfeiffer 586d959055 Merge branch 'master' into live-activity-data 2015-10-02 23:49:03 +02:00
cpfeiffer baa2d0b27a Displaying live activity data works well enough 2015-10-02 23:38:07 +02:00
Daniele Gobbetti d14ccf1c5c Get device name from the BLE Standard Characteristic.
Always log read and notify characteristics, even if unhandled.
Changed Log statements for write action to make them clearer.
2015-09-28 16:47:43 +02:00
Daniele Gobbetti 18f952250a First working code for vibrations on firmware version 1.0.10.14 2015-09-28 12:53:42 +02:00
cpfeiffer 4250a002b4 Merge branch 'master' into live-activity-data 2015-09-27 00:16:04 +02:00
Andreas Shimokawa 1d41f2f8e4 Refactoring
The notfification APIs now use NotificationSpec as their only parameter, which
contains all information (required and optional ones).
We no longer have separate methods and actions for SMS/EMAIL/GENERIC anymore.
The type of notification is important now, not how we received them technically.
2015-09-24 14:45:21 +02:00
Andreas Shimokawa 95e22a4e32 Pebble: Allow stopping apps though PebbleKit messages (also in the API) 2015-09-13 21:44:26 +02:00
Andreas Shimokawa 4f80844016 noficicaion_kind -> notificationKind 2015-09-13 13:38:11 +02:00