1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-17 02:44:04 +02:00
Commit Graph

1370 Commits

Author SHA1 Message Date
Andreas Shimokawa
f05cc83848 Pebble: set MIN_ACTION_LENGTH = 6, which is correct 2018-11-01 16:02:29 +01:00
Andreas Shimokawa
f3e16c5b1d Pebble: Fix regression causing "Open on Phone" and "Dismiss" to appear on Pebble notification with no corresponding Android notification (i.e. PebbleKit notifications) 2018-11-01 14:55:14 +01:00
Daniele Gobbetti
eede85a9c9 Various improvements and bugfixes to notification handling
Prevent duplicate notifications with a dedicated data structure (not reusing
the anti-burst one) #1062, #657
Pebble: Forward the actions attached to notifications (not only reply)
inspired by the work of dnastase #705
2018-10-31 21:47:12 +01:00
Andreas Shimokawa
dde8a5044f Mi Band 3: Whitelist FW 1.8.0.0 2018-10-28 15:32:57 +01:00
Sebastian Kranz
6b82340093 Merge branch 'master' of https://github.com/Freeyourgadget/Gadgetbridge into zetime 2018-10-01 06:39:08 +02:00
Sebastian Kranz
6fa2dc04f3 Setting the signal types is written to the watch now. 2018-09-28 19:36:35 +02:00
José Rebelo
e62fe36391 Roidmi 3: Fix and enable support 2018-09-28 16:35:09 +01:00
Andreas Shimokawa
b1b318a18b Amazfit Bip: Allow flashing latest gps firmware from Mi Fit 3.5.1.1 (Mili_dth.gps)
This file seems to be for the Bip2, but firmwares.json also refereces this for the Bip.
And it seems to work.
2018-09-23 12:02:34 +02:00
cpfeiffer
60397c88c0 Avoid possible NPE 2018-09-23 11:27:35 +02:00
Sebastian Kranz
2df8dfed18 Add a submenu to choose between different signal types. 2018-09-20 14:38:06 +02: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
Sebastian Kranz
bc20db44f4 BUGFIX: use correct preference key to toggle wrist flick on and off. Add: fill function onFindDevice with test commands for the signaling of the watch, if watch is set to buzzer just the buzzer is used, ... and so on. 2018-09-17 14:43:09 +02:00
Sebastian Kranz
ecfd83ae65 Add setting alarms. Choose the type of the signaling in the preferences. 2018-09-17 13:53:24 +02:00
Sebastian Kranz
ba0fdb8c96 Part 2: Add inactivity alert - complete now. Add checkbox to en-/disable the heart rate alarm and group this with the limits in its own screen. 2018-09-17 08:10:49 +02:00
Sebastian Kranz
828df4898f First part: Add inactivity alert. 2018-09-17 05:53:24 +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
8c1a1861e4 Fix some static analysis warnings 2018-09-16 13:59:16 +02:00
cpfeiffer
c1de677448 Remove redundant null checks 2018-09-16 13:58:01 +02:00
cpfeiffer
100ed9f50c Use \n as line endings 2018-09-16 13:55:57 +02:00
cpfeiffer
5028458fe8 Fix some static analysis warnings 2018-09-16 13:54:56 +02:00
cpfeiffer
08dfa2a47d Log the stacktrace as well 2018-09-16 00:12:52 +02:00
cpfeiffer
f142003f09 Avoid boxing 2018-09-16 00:12:40 +02:00
cpfeiffer
898165ce0b Avoid lots of false static analysis warnings 2018-09-15 23:30:39 +02:00
cpfeiffer
87bee53ef3 Add a tiny bit of javadoc 2018-09-15 22:43:45 +02:00
cpfeiffer
f9e600d369 Deduplicate code 2018-09-15 22:38:20 +02:00
cpfeiffer
d6f5e36e12 Huami devices: Fix seldom fetch failures (better support for app level ble feedback)
Fixes #1264
2018-09-15 22:24:27 +02:00
Sebastian Kranz
6be181047a Add more preference settings for ZeTime: time and date format, activity tracking, do-not-disturb scheduling, wrist-flick, analog mode and calories type. 2018-09-14 13:32:18 +02:00
Sebastian Kranz
6617c45fec Add setting heart rate alarm values. Make the settings of the wearside and screen on duration interactive - give them their own activity. Also make the auto heart rate measurement work. 2018-09-13 14:55:38 +02:00
Sebastian Kranz
59a73d47af BUGFIX: setting goals now correct! Add automatic heart rate measurement settings - but the function got not called. Add option to leave activity data on the watch or delete them. 2018-09-12 13:59:45 +02:00
cpfeiffer
b6d68207cb Don't store the live step values in the db 2018-09-11 23:26:51 +02:00
cpfeiffer
add9be5ff6 Another place to handle possible negative steps values 2018-09-11 23:24:27 +02:00
Andreas Shimokawa
59ddedcf9a Mi Band 3: Whitelist FW 1.6.0.16 2018-09-11 21:35:30 +02:00
Andreas Shimokawa
6644ad0bb0 Mi Band 3: Allow enabling the "Workout" menu item
(This is called "Activity" in Gadgetbridge, since we have that on the Bip, we should probably rename that to Workout also for consistency with the menus)
2018-09-11 21:32:13 +02:00
Sebastian Kranz
8062729ea8 Send user info to the watch, add more daily targets (goals) and send them to the watch. 2018-09-07 10:53:33 +02:00
cpfeiffer
a2bd8212f6 Attempt to fix connection problems on Samsung devices 2018-09-06 18:25:41 +02:00
Sebastian Kranz
ca7108c153 Add ZeTime settings: choose on which wrist you wear the watch and set screen on duration. 2018-09-06 14:51:29 +02:00
Sebastian Kranz
88ba3e8e14 merge master branch 2018-09-06 14:46:25 +02:00
cpfeiffer
19ee3a14d4 Handle batter state LOW without a level
Fixes #1197
2018-09-04 22:31:12 +02:00
Dikay900
64da085942 make heart rate values configurable and use singleton for heartrateutils
to listen for preference changes
2018-09-02 12:57:52 +02:00
José Rebelo
2fe4b84a10 Roidmi: Initial Support
Roidmi 3 support is disabled for now, since it is not working.
2018-08-31 14:03:47 +01:00
José Rebelo
cc6c57bd4c Add support for LED Color, FM Frequency 2018-08-31 14:03:39 +01:00
Daniele Gobbetti
3e989cd89a Amazfit Cor: Whitelist FW 1.2.5.00 and RES 2018-08-29 21:33:38 +02:00
License Bot
696653eabf Update contributors list and license headers. 2018-08-29 21:30:23 +02:00
Andreas Shimokawa
b8c7bb2c2e Amazfit Bip: whitelist firmware 1.1.2.05 2018-08-28 22:19:53 +02:00
Andreas Shimokawa
13ff40c7a5 Mi Band 3: Whitelist some firmware version I tested 2018-08-28 22:10:58 +02:00
José Rebelo
9fda67b297 Mi Band 3: Night Mode 2018-08-27 22:54:37 +02:00
Andreas Shimokawa
ffc6bd5a73 Mi Band 3: Also fix diplay of SMS and EMAIL
We have to send a fake app source that is never displayed to make the text appear... :P
2018-08-19 00:51:04 +02:00
Andreas Shimokawa
3d70314e8c Mi Band 3: Fix messages not being displayed (send app source with notifications and use chunked characteristics where available)
This also sends the app name for Bip and Cor, which is actually displayed when there is no icon (unknown app for the device)

Fixes #1203
2018-08-19 00:35:50 +02:00
Andreas Shimokawa
c81965b88d Mi Band 3: Raise limit of RES files to 150000 bytes
Fixes #1223
2018-08-18 23:02:36 +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
Andreas Shimokawa
74f47c8e2e Mi Band 3: Support setting language to German, Italian, French, Polish, Japanese, Korean
NOTE:
- Needs latest firmware
- Setting to Japanese or Korean leads to empty menus on the device. When
  reconnecting you, will get a sceen which telling you to update. I highly
  suspect it requires flashing Mili_wuhan.ft.kj (kj=korean,japanese)
2018-08-13 00:00:46 +02:00
Andreas Shimokawa
3bb75a62be Mi Band 3: whitelist tested firmwares 2018-08-12 00:28:27 +02:00
Andreas Shimokawa
b48b52b175 Mi Band 3: Make order of menu items on screen deterministic again
(This partly reverts the logic of the previous commit)
2018-08-12 00:16:56 +02:00
José Rebelo
470efa3e51 Mi Band 3: Change display items 2018-08-12 00:00:38 +02:00
Daniele Gobbetti
9517fa211e Intercept alarm actions of the google clock application
Implemented blindly based on the information provided in #1199
Fixes #1199
2018-08-10 18:36:29 +02:00
José Rebelo
338251597b Mi Band 3: Band screen unlock 2018-08-09 23:41:25 +02:00
Carsten Pfeiffer
4a07c63381
Merge pull request #1194 from elagin/string_toString
Redundant String.toString()
2018-08-08 21:34:45 +02:00
Carsten Pfeiffer
95e39cabba
Merge pull request #1190 from maxirnilian/watch9
Watch 9: Initial support
2018-08-08 21:16:59 +02:00
Daniele Gobbetti
797a671ccd Amazfit Cor: only send music information when needed 2018-08-08 17:48:23 +02:00
Pavel Elagin
723b5af50f Redundant String.toString() 2018-08-08 12:55:25 +03: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
cc3c70b161 Send results of AbstractBleProfile synchronously
This should fix issues like a ConditionalWriteAction failing with an NPE when GBDevice.getFirmwareVersion() returns null even though the DeviceInfoProfile had already received the firmware version (but the intent notification has not been received yet).
2018-08-06 20:51:28 +02:00
cpfeiffer
ec0d62f67b If firmwareRevision is null, use softwareRevision 2018-08-06 20:26:39 +02:00
cpfeiffer
92bd3122f3 Improve logging 2018-08-06 20:22:10 +02:00
cpfeiffer
f7c9828cc1 Avoid potential NPE 2018-08-06 20:22:10 +02:00
maxirnilian
4ff04870ca Watch 9: Initial support 2018-08-06 18:30:38 +02:00
Andreas Shimokawa
88714ece4d Amazfit Bip: fix current weather not being displayed with latest firmware 2018-08-05 15:27:28 +02:00
protomors
fd68700b9a NO1 F1: Set time during initialization. 2018-08-05 00:09:43 +02:00
protomors
343239ff9e NO1 F1: Fixed typo. 2018-08-05 00:09:43 +02:00
cpfeiffer
5bca05caac Fix loop condition! 2018-08-04 23:10:11 +02:00
Andreas Shimokawa
fe401bdcf5 Amazfit Cor: allow music control 2018-08-02 22:35:02 +02:00
Andreas Shimokawa
66391e10c9 Amazfit Cor: Allow to enable music menu on device 2018-08-02 22:29:52 +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
f464604b27 Amazfit Cor: Fix notification menu not being enabled 2018-08-01 23:13:36 +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
cpfeiffer
16fb1a584d Errors during activity track timestamp fixup should be non-fatal
So just log them. #1134
2018-08-01 19:49:09 +02:00
cpfeiffer
7f1c0521ea Small fixes to activity point timestamp fixup 2018-08-01 19:33:33 +02:00
szilardx
14a086c1f3 Add missing ActivityPoints and timestamp 2018-08-01 19:33:33 +02:00
Vadim Kaushan
9a13d5ea4a ID115: code cleanup 2018-07-30 23:24:20 +03:00
Vadim Kaushan
fd7a0cb124 ID115: fetching activity data 2018-07-30 23:23:13 +03:00
Vadim Kaushan
caabe0ed0a ID115: use SendNotificationOperation for message and call notifications 2018-07-29 21:30:31 +03:00
Vadim Kaushan
458a363f11 Merge remote-tracking branch 'upstream/master' 2018-07-29 19:31:40 +03:00
José Rebelo
18b13b7772
Add missing break 2018-07-27 14:39:01 +01:00
dakhnod
63cb70ac9a Fix missing sourceAppID field 2018-07-23 02:50:05 +02:00
Daniele Gobbetti
2da6749a40 Add activity kind (if known) to gpx filename
Fixes #1161
2018-07-22 16:14:36 +02:00
Andreas Shimokawa
e96dcc69ab Amazfit Bip: try to support weather in newer firmwares 2018-07-21 17:18:08 +02:00
Andreas Shimokawa
d1253348dc Mi Band 3: whitelist tested firmware, res and font 2018-07-19 12:00:17 +02:00
Andreas Shimokawa
eef38d4680 Only use 0x00 as auth flags on Mi Band 3 - to not disturb other devices 2018-07-17 00:29:36 +02:00
Andreas Shimokawa
aa143577f8 Amazfit Cor: Support language switching on newer firmwares
I shamelessly assumed the firmware version (chose the version that was included in the same Mi Fit version when bip started to support the new command)
2018-07-16 15:18:46 +02:00
Vadim Kaushan
b6bd100f28 ID115: remove useless debug messages 2018-07-16 15:50:29 +03:00
Vadim Kaushan
65fbb4da5b ID115: wrist setting 2018-07-16 15:48:37 +03:00
Andreas Shimokawa
f2aa71e32c Amazfit Bip: Support Russian language.
Closes #1145
2018-07-16 14:36:52 +02:00
Andreas Shimokawa
46f3686764 Mi Band 3: Also send AQI for weather to make current temperature appear 2018-07-16 14:19:02 +02:00
Sebastian Kranz
c30ec7d407 BUGFIX: use newer weather icons, if firmware build is B41 or higher. The new firmware supports 24 icons, older ones have only 6. 2018-07-16 13:41:59 +02:00
Vadim Kaushan
c43a564a47 Merge remote-tracking branch 'origin/master' 2018-07-15 00:53:47 +03:00
Vadim Kaushan
a94e0b9463 ID115: log IO exceptions 2018-07-15 00:46:11 +03:00
Vadim Kaushan
fe9ec9b88a ID115: screen orientation preference 2018-07-14 13:23:21 +03:00
Vadim Kaushan
02b3f23329 ID115: set steps goal 2018-07-13 15:00:16 +03:00
Sebastian Kranz
18202bffbd Fix timestamps of activities, cause the watch reports them with 6 hours offset. 2018-07-13 13:24:47 +02:00
Vadim Kaushan
c9e7a2ff1d ID115: notification support 2018-07-13 14:08:11 +03:00
Vadim Kaushan
4bea2a3407 ID115: fix logger name 2018-07-13 13:54:19 +03:00
Sebastian Kranz
99bdb4a30a Use evaluteGBDeviceEvent to send events to the app/android system, instead of calling directly the handle ufunctions. 2018-07-13 10:35:18 +02:00
Sebastian Kranz
f0174d904a Bugfix: calendar needs the date as number. Add comment about converting date digits to characters. 2018-07-13 10:10:41 +02:00
Vadim Kaushan
8a0263d3ff ID115: Fix date calculation 2018-07-12 15:57:00 +03:00
Vadim Kaushan
814ca76733 ID115: basic support 2018-07-12 15:48:09 +03:00
Sebastian Kranz
6781e1e14a Rework onNotification function: Assemble the message and send decide, which icon should show up on the watch. Email support seems broken in newest firmware (1.7 Build 41) of the watch! 2018-07-12 07:30:41 +02:00
Sebastian Kranz
888d08ae77 Replace performConnected() with builder.queue(getQueue()) to write the commands and data to the watch. 2018-07-11 11:59:32 +02:00
Sebastian Kranz
c1673554ee Better use bit shifting and masks to avoid negative values. 2018-07-11 07:17:40 +02:00
Sebastian Kranz
f3264fab0a Fix typo. 2018-07-11 06:49:01 +02:00
Sebastian Kranz
7d8d484133 Merge branch 'master' into zetime 2018-07-10 06:48:20 +02:00
Andreas Shimokawa
3236e20657 Amazfit Bip/Cor: rework fimware detection to rely on strings instead of version numbers
The new version scheme and the fact that recent Bip and Cor firmwares are
impossible to distinguish by comparing data at fixed offsets make it necessary
to dynamically search for sequences of data. We do this now by searching for
"Amazfit Bip Watch" and "Amazfit Cor".
2018-07-08 12:16:26 +02:00
Sebastian Kranz
edee0904ff Add all activity data to the database; at the moment not all are displayed. Try to fix value calculations, because negative results do not make sense here. Restrict the body length from notification to the max value of 256 characters. 2018-07-06 21:59:30 +02:00
Sebastian Kranz
0a37b8ef87 Fix music control. Now everytime the track changes the correct title is displayed. Set limits for volume up and down. Set a initial value of 50% at connect... 2018-07-06 20:33:45 +02:00
Sebastian Kranz
c2d608b0ef Add time synchronization. Some values/parameters are fixed at the moment, which shouldn't be maybe. 2018-07-06 08:19:04 +02:00
Sebastian Kranz
fec1f1afc6 Fill function to to add a calendar event at the day view. 2018-07-05 10:28:27 +02:00
Sebastian Kranz
7c65fa4fc0 BUGFIX: correct the length needed if a string includes multi bytes. Because a character is encoded of up to 4 bytes. Fix using the correct progess and available variables for the activities. Also restict the volume up and down commands to 16 steps. 2018-07-05 07:25:17 +02:00
Andreas Shimokawa
6e34d313c7 Mi Band 3: allow setting language (english and spanish work) 2018-07-04 23:32:35 +02:00
Sebastian Kranz
ed20f69cc4 Add functionality to control the music playback from the watch. Not sure if all of this is correct. Having issues that the track title isn't updated until you issue a play, pause command from either the phone or watch. 2018-07-04 14:52:21 +02:00
Sebastian Kranz
6882127bec Add function to sync weather data to the watch, translate weather codes to icons. 2018-07-04 07:09:50 +02:00
Sebastian Kranz
497372f377 Add support for sending some generic notifications for incoming calls, missed calls, sms, email, social and messenger. 2018-07-03 13:09:46 +02:00
Andreas Shimokawa
a3e22d573f Amazfit Bip: Whitelist FW 1.0.2.00 2018-07-01 23:26:03 +02:00
Martin
91cbdfde10 added time limited on auto-fetch, and removed the creation of multiple autoFetchReceivers 2018-07-01 22:57:48 +02:00
Andreas Shimokawa
d1cba54425 Mi Band 3: Allow flashing fonts (untested) 2018-07-01 22:41:37 +02:00
Andreas Shimokawa
9303214997 Amazfit Cor: allow flashing fonts (seem to be the same as for bip, untested) 2018-06-30 00:32:29 +02:00
Andreas Shimokawa
87f9424ee3 Amazfit Bip: allow flashing latest beta firmware 2018-06-29 23:04:38 +02:00
Sebastian Kranz
59095dc29b Clean-up the merge. 2018-06-29 11:18:36 +02:00
Sebastian Kranz
1b152c86ea Merge branch 'master' into zetime 2018-06-29 10:43:11 +02:00
Sebastian Kranz
5e236e113f Fix function to put step data into database, using the full unix epoch now. Add function for putting sleep and heartrate data into the database. 2018-06-28 13:48:41 +02:00
Sebastian Kranz
789fba95d1 Add function to check available activities and then get them. Add function to get the steps. First try to get the data into the database. 2018-06-27 09:01:26 +02:00
Sebastian Kranz
3539dd3e34 Get the also the device firmware version. Add function for messages that are broken down into two transmissions, because of their length. 2018-06-26 07:29:11 +02:00
Andreas Shimokawa
49a5f349b0 Amazfit Cor: Whitelist FW 1.0.7.88
Closes #1104
2018-06-25 21:37:26 +02:00
License Bot
225a600aed Update license headers 2018-06-25 18:35:46 +02:00
Sebastian Kranz
e18b043d27 request activity info with a function. 2018-06-24 12:25:34 +02:00
Daniele Gobbetti
6807714af3 Register autofetch receiver in DeviceCommunicationService
This allows the register to be registered only when the device is connected,
and also toggling without completely exiting the application.

The logic in the receiver itself was simplified and an explanation added
to the preference summary.
2018-06-23 11:19:09 +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
Kranz
65f12bc1ee Fix error inside the isMsgFormatOK function. Add DeviceInfoHandler to read the hardware info and notify about battery level. 2018-06-22 07:20:45 +02:00
Sebastian Kranz
1213ecc344 Add function for requesting device info and battery level. 2018-06-21 19:56:13 +02:00
Andreas Shimokawa
c6b23041f7 Pebble: Always connect to SDP UUID on NON-LE Pebble
Fixes #726
2018-06-20 22:06:45 +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
Martin
36aae1e81c Auto sync feature (#1127)
* Auto fetch feature
fixes #1116
2018-06-19 21:54:15 +02:00
Andreas Shimokawa
9bcae3e000 Amazfit Bip: Whitelist FW 0.1.1.45 2018-06-16 23:35:02 +02:00
Kranz
c611042e51 Add more commands. Add message check function. 2018-06-15 13:40:16 +02:00
Kranz
89c8c9cdfb First communication test between ZeTime and GB. Ask about activitys, sleep and heart-rate infos available. ZeTime responds correctly 2018-06-15 11:23:44 +02:00
Andreas Shimokawa
99dec159f7 Mi Band 3: add untested and incomplete support
This also improves firmware/RES probing to distinguish Mi Band 2/3 firmware files and Mi Band 3/Bip RES files.

Notes:
- Firmware flashing should might but is untested
- This basicall runs off the Amazfit Bip code which will probably incorrect (Mi Band 3 is proabably something between the Bip and the Mi Band 2)
2018-06-14 18:16:49 +02:00
Andreas Shimokawa
3dd1929436 Huami devices: Minor refactoring 2018-06-14 16:30:43 +02:00
Sebastian Kranz
48affad220 Add some UUIDs and Cmds. Connect further. 2018-06-08 16:28:05 +02:00
tiparega
3852f925da Added support for Q8 devices 2018-05-20 19:52:08 +02:00
Andreas Shimokawa
d1368c2ed8 Amazfit Bip: Whitelist FW 0.1.1.41 2018-05-20 19:42:29 +02:00
Daniele Gobbetti
3c3e38741a Pebble: remove the legacy countdownlatch on Pebble GATT server code
The GATTServer code is now in line with the new GATTClient code.
2018-05-19 22:42:05 +02:00
Andreas Shimokawa
3b25181a32 Amazfit Bip: allow enabling shortcuts (weather, Alipay) 2018-05-15 23:12:18 +02:00
Daniele Gobbetti
e6748c34fc Update the notification from DeviceManager instead of DeviceCommunicationService
Since the device object (local to DCS) is set to null on disconnect, the
notification could not get updated from within the receiver. DeviceManager
does not have such issues.

The problem appeared with 3f421facab
2018-05-13 20:19:09 +02:00
Andreas Shimokawa
f46c204c75 Amazfit Cor: Whilelist FW 1.0.7.52
Closes #1087
2018-05-12 22:20:49 +02:00
Andreas Shimokawa
511fef7f62 Pebble 2: when using client only mode, no not wait for PPoGATT ACKs after each package
This speeds up things up a lot. We should still somehow limit it, but not by waiting
after one PPoGATT ACK after each complete PP package.

This leaves the old mode untouched, so we have something to compare
2018-05-12 17:18:19 +02:00
Andreas Shimokawa
eb08e66674 Amazfit Cor: make sure that Veats firwmare does not get detected as a Cor firmware... 2018-05-12 00:15:14 +02:00
Andreas Shimokawa
746cb00460 Amazfit Cor: Fix recogition of new firmwares
Newer Cor and Bip firmwares seem to be indistinguishable,
What we do for now is use the version we already search for say
Bip firmwares are valid from 0.0.8.00 to < 1.0.5.00 (lastest as of today is 0.1.0.39)
Cor firmwares are valid from 1.0.5.00

This should work for a while.
Fixes #1095
2018-05-12 00:05:30 +02:00
Andreas Shimokawa
3f421facab Always cleanup device and receiver in service when disconnecting
Fixes #1093

I have no idea why the code was like this, so the change might have some bad consequences...
2018-05-11 20:50:29 +02:00
Martin Piatka
00ee9b6828 Mi Band 2: wait at least 4s before sending notification text
This fixes notification text not displaying when a short vibration
pattern is set.

If the notification text is sent while the icon is still visible
it is not displayed. We need to wait until it disapears (about 4 seconds)
2018-05-11 18:07:50 +02:00
Andreas Shimokawa
9e2558beac Pebble 2: make gatt client only mode available to users 2018-05-11 14:23:41 +02:00
Andreas Shimokawa
cdf6039d4c Pebble 2: fixes for experimental client only gatt code
This basically makes sure that
- only one gatt write operation is in progress
- data is not sent from within callbacks to prevent a deadlock when waiting for a nre callback that cant happen yet beause the current has not been retuned
2018-05-11 13:21:40 +02:00
Andreas Shimokawa
f6131772d6 Pebble2: WIP broken and disabled GATT client only support
This will eliminate the need for the Phone being a GATT Server and might lead
to better connection stability once it is ready.

NOTE: Enabling this in the code (change clientOnly=true in PebbleLESupport)
will only work for a few packets before in totally breaks, so only enable
if you want to fix it :P
2018-05-10 22:03:03 +02:00
Andreas Shimokawa
5df799419e Mi Band 2: 2hitelist Firmware 1.0.1.81
Closes #1070
2018-05-07 21:54:44 +02:00
Andreas Shimokawa
b585fde78a Amazfit Bip: Raise .res limit to 700000 bytes for modded files 2018-05-06 16:34:14 +02:00
Andreas Shimokawa
8fe0c213cb Amazfit Bip: Whitelist a bunch of new FW versions 2018-05-06 09:54:31 +02:00
Andreas Shimokawa
1996184d69 Amazfit Bip: fix fetching logs from device via debug menu 2018-05-03 23:31:18 +02:00
Andreas Shimokawa
cf438618aa Amazfit Bip: actually include FW 0.1.1.14 in the allowed firmwares that can change menu items 2018-04-27 21:05:52 +02:00
Andreas Shimokawa
e1ef2455dc Amazfit Bip: allow to set displayed menu item in firmware >=0.1.1.14
NOTE:
- You will have to be connected while doing the changes in preferences (FIXME)
- It might not work at all since I did not test after the latest changes :P
2018-04-27 09:28:33 +02:00
Daniele Gobbetti
cc83021ae3 Weather (and Pebble Webview): fix name and add wind information to weather data
Wind information are stored and put in the reconstructed OWM response.
A long standing bug (having the "name" field inside "main" instead of at
the root level of the json) has been fixed
Lineage OS receiver and if possible weather notification app receiver will
be added in further commits.

See #482
2018-04-14 19:42:05 +02:00
AndrewH
1b9b5f821e GPX export fixes (#1060) 2018-04-13 00:50:47 +02:00
Daniele Gobbetti
8f6d287592 Amazfit Bip: add option to reset the last fetched activity (timestamp)
Show a datepicker to reset the date after which the next activity will be fetched.
Also add .gpx extension to fetched activity track (if present) and make
the menu entries translatable.

Close #1057
2018-04-12 22:11:58 +02:00
Daniele Gobbetti
27caa08a1b Amazfit Bip: do not export GPX tracks if there is no point in the track
The approach ignores the activity types and only uses the presence of
valid lon/lan points in the track to create the GPX file or not.
2018-04-02 18:42:08 +02:00
Andreas Shimokawa
e19c3f7ea0 Amazfit Bip: work around problems when syncing tracks in CEST
(#952)
2018-04-02 00:22:55 +02:00
TaaviE
08feaf30e1 Fixed a bunch of misspells. 2018-03-31 17:31:48 +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
Andreas Shimokawa
c493df2423 Merge branch 'bip-wip' 2018-03-31 11:31:03 +02:00
Andreas Shimokawa
cf97677cdc Amazfit Bip: Whitelist Firmware 0.1.1.14 2018-03-30 14:40:40 +02:00
Andreas Shimokawa
66bb0bd81b Merge branch 'master' into bip-wip 2018-03-27 11:09:59 +02:00
Andreas Shimokawa
41632b8eb3 Only send dummy AQI to Bip, not to Cor
See #1033
2018-03-24 19:28:06 +01:00
Andreas Shimokawa
74f9798071 Amazfit Cor: try to send location
This could help #1033
2018-03-24 19:22:49 +01:00
Andreas Shimokawa
73cfeb8a7e Mi Band 2: scheduling diplay on lift wrist does not work (only on Bip), make the on and off settings at least work again... 2018-03-24 00:00:25 +01:00
Andreas Shimokawa
e26dbc6812 Mi Band 2/Bip/Cor: allow to set a period when the display/background light gets enabled when lifting the wrist
Closes #1013
2018-03-23 23:30:28 +01:00
TaaviE
6be7ee4a96 Fixed a few misspells and extended my name. 2018-03-23 07:26:25 +01:00
cpfeiffer
d2c952ffa5 Improvements to the singleton pattern, better encapsulate fields 2018-03-18 12:59:32 +01:00
Andreas Shimokawa
3d3cc1f40c Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
Sergio Lopez
092e62bfad Pebble: add support for weather in Simply Light watchface
Celsius forced as with other watchfaces #482
2018-02-28 22:42:47 +01:00
Daniele Gobbetti
d88badaf4d Pebble JS: add transactionId metadata to the appmessage.
Removes the errors in Pebble-Casio-WV58DE as reported in #482
2018-02-28 21:56:46 +01:00
License Bot
238bacde9f Update license headers 2018-02-26 14:27:33 +01:00
ladbsoft
d5978d9b30 Xwatch Basic Support (#972)
Initial XWatch support

* Activity syncing
* Multimedia control using the watch's button
2018-02-25 12:05:36 +01:00
Andreas Shimokawa
6ebc763a4c Amazfit Bip: whitelist firmware 0.1.0.86 2018-02-24 00:03:19 +01:00
Daniele Gobbetti
daabff1364 Blind attempt to fix crashing configuration page if bgJS is disabled
This might help #643 but I could not reproduce the reported issue
2018-02-23 18:56:05 +01:00
Andreas Shimokawa
669f4bcdd0 Mi Band 2: use native notification patterns instead of manually timed ones
What we do now is:
- Send a notification with the app icon
- Send the vibration pattern right away (this causes the first unwanted
  vibration to be cancelled immediately and only the pattern is noticable,
  while the icon stays on screen during the vibration pattern)
- (optional) send the text together with a generic sms icon

This also fixes problems of text not appearing in newer firmwares when
a notification pattern with repeat has been set in Mi Band settings.
2018-02-18 01:43:05 +01:00
Daniele Gobbetti
4f246b3ed9 Add Antox to the chat applications.
Notifications coming from the chat.tox.antox package are treated as chat
messages. This closes #910
2018-02-17 17:39:15 +01:00
Daniele Gobbetti
48b89f1bd2 Add Kontalk to the chat applications.
Notifications coming from the org.kontalk package are treated as chat
messages. This closes #994
2018-02-17 17:33:34 +01:00
Andreas Shimokawa
e48885df7d Merge branch 'master' into bip-wip 2018-02-15 23:38:06 +01:00
Andreas Shimokawa
4d7c697497 Pebble: Fix for background javascript that tries to send floats or doubles
Also log further exceptions

Thanks @danielegobbetti for the original patch ;)
2018-02-14 23:20:22 +01:00
Daniele Gobbetti
e28333fe6e Fixes to make the application run on Oreo
- tested on Oreo 8.1

this commit includes changes cherry picked from 3b6da66643
2018-02-14 21:35:22 +01:00
Daniele Gobbetti
55d9ff0954 Amazfit Cor: Whitelist firmware 1.0.6.76
Reported as working on the issue tracker. Closes #984
2018-02-10 23:36:05 +01:00
Daniele Gobbetti
8ba56db786 Pebble Webview: refine response mimicking
- check the called domain to return (potentially) different messages
- mimic the online check of TrekVolle watchface
2018-02-10 16:53:35 +01:00
Andreas Shimokawa
b9c6b3bb8f Amazfit Bip: Whitelist fw 0.1.0.70/80 and fonts
Also change the recommended flashing order of .fw .res and .gps
2018-02-08 22:41:16 +01:00