1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-10 16:26:46 +02:00
Commit Graph

1313 Commits

Author SHA1 Message Date
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
Andreas Shimokawa
ea4a4edc5b Amazfit Bip: Fix language setting on new firmwares 2018-02-08 22:21:15 +01:00
Kranz
bd673fb4af Initial device support for MyKronoz ZeTime, following the wiki page add new device support. 2018-02-08 07:21:12 +01:00
Andreas Shimokawa
e657b327c9 Pebble: only call Pebble object in javascript if it is actually available 2018-02-04 00:02:14 +01:00
Andreas Shimokawa
3871b6f0be Amazfit Cor: Allow watchfaces to be flashed
Untested as Cor has no maintainer
2018-02-01 14:22:18 +01:00
Andreas Shimokawa
5973f189eb Amazfit Bip: try to detect the font type not by the size
This could help modders
2018-01-30 23:28:49 +01:00
Andreas Shimokawa
95cc538575 Amazfit Bip: Allow language to be set to Spanish (needs firmware 0.1.0.66 beta, not recommended)
This also requires the latin font to be flashed before.
2018-01-30 23:06:08 +01:00
Andreas Shimokawa
0c907f0ba1 Amazfit Bip: whitelist 0.1.0.44 firmware 2018-01-27 23:03:47 +01:00
Andreas Shimokawa
f6f4d7ec40 Amazfit Cor: support flashing new res format also on Cor 2018-01-27 21:51:34 +01:00
Andreas Shimokawa
14a6c9a626 Amazfit Bip: support flashing new res, font, and latin font files
Required for firmware 0.1.0.66
2018-01-27 21:41:35 +01:00
Andreas Shimokawa
d9c012025d Pebble: prepend application start event to premature appmessage from a newly started app
This should fix some InvalidStateExceptions when using background javascript
2018-01-25 16:42:43 +01:00
Andreas Shimokawa
1349a1c7da Merge branch 'master' into bip-wip 2018-01-22 08:57:01 +01:00
Andreas Shimokawa
76cf667202 Amazfit Bip, do not set menu items during initializaton
(This could prevent menus from vanishing when updating to FW 0.1.0.51)
2018-01-20 01:34:40 +01:00
Andreas Shimokawa
06d6aeacb9 Prepare find phone feature to be generic and implement apphandler for upcoming pebble helper app 2018-01-19 23:12:50 +01:00
cpfeiffer
fa0fd250cf Attempt to fix crash with ExternalPebbleJSActivity #863 2018-01-14 01:40:04 +01:00
cpfeiffer
da5d1e3685 Trying to simplify ExternalPebbleJSActivity#onCreate() a bit
(by splitting into separate methods)
2018-01-14 00:20:13 +01:00
cpfeiffer
9ee1aa87e8 Move some methods to clarify responsibilities and simplify some things 2018-01-13 21:58:40 +01:00
cpfeiffer
e159a5dde3 Cleanup, deduplication, null-handling fixes 2018-01-13 21:08:51 +01:00
Andreas Shimokawa
c420f2ce93 Amazfit Bip: implement find phone feature
This probably also works with Amazfit Cor

Closes #887
2018-01-13 18:46:21 +01:00
Andreas Shimokawa
fda4816fc1 Mi Band 2: Whitellist firmwares I tested
Fixes #939
2018-01-13 16:56:30 +01:00
Andreas Shimokawa
aca31c320a Amazfit Cor: allow to flash latest firmware 2018-01-13 16:29:48 +01:00
Andreas Shimokawa
68bd6f99e2 Amazfit Bip: whitelist latest firmwares and support flashing latest GPS firmware 2018-01-13 11:12:58 +01:00
Lukas Veneziano
781359afba Added notification type for business calendar 2018-01-12 21:12:33 +01:00
Andreas Shimokawa
6f68c8adde Merge branch 'master' into bip-wip 2018-01-04 12:09:57 +01:00
Lukas Veneziano
6b339a3013 Added notification type for threema app 2017-12-31 00:10:39 +01:00
Andreas Shimokawa
cad9e4ddd0 Amazfit Bip: whitelist firmware 0.1.0.39 2017-12-31 00:07:40 +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
b91204e109 Amazfit Bip: allow installation of latest gps firmware 2017-12-22 23:29:38 +01:00
Andreas Shimokawa
ad750c0047 try to fix cor firmware recognition for newer versions 2017-12-21 09:35:33 +01:00
Daniele Gobbetti
888e7fa229 Add support for Omnirom Omnijaws weather service.
This uses a contentobserver and doesn't do anything if it's not available.
Should be feature equivalent to the LineageOS weather receiver.
2017-12-17 22:35:17 +01:00
Andreas Shimokawa
7e2f895001 Merge branch 'master' into bip-wip 2017-12-17 00:24:48 +01:00
Andreas Shimokawa
64968d8a99 Amazfit Bip/Cor: change AQI string from (fake) to (n/a) 2017-12-17 00:01:00 +01:00
Andreas Shimokawa
34c3737f3c Amazfit Bip: Whilelist recently tested versions 2017-12-16 23:25:56 +01:00
Andreas Shimokawa
948002dc7c Weather: recreate OWM fake reply from weatherSpec, no not directly create in in Weather Notification receiver
This should bring CM weather on par with Weather Notficication when using background js
2017-12-14 14:54:09 +01:00
cpfeiffer
fccd2ebb77 Display the actual firmware kind instead of "Firmware"
i.e. "GPS Firmware", "Watchface", "Resources", ...
2017-12-11 23:36:39 +01:00
Andreas Shimokawa
bfceaf9cc9 Merge branch 'master' into bip-wip 2017-12-11 19:30:54 +01:00
Andreas Shimokawa
f0ac296492 Initial support for cyanogenmod/lineage weather provider
TODO:
- also reconstruct json for Pebble background js fake replies
- find a better location for settings
- interatively display candidates when looking up location
- grey out setting on non-cm/los devices
2017-12-11 19:09:37 +01:00
Andreas Shimokawa
b7b96b5ab5 Amazfit Bip/Cor: for untested installable files, at least display the type (res/font/gps/watchface)
For res the version is also displayed (the same as noted in the wiki)
2017-12-10 20:30:27 +01:00
Andreas Shimokawa
ff93122ddc Amazfit Bip/Cor: parse and display firmware version for unknown versions
Unfortunately that does not work for the Mi Band 2 yet
2017-12-10 11:31:42 +01:00
Andreas Shimokawa
8fbf97f713 Amazfit Bip/Cor: Send fake AQI 0 to make current weather appear
I have no idea why this is necessary.
But at least it makes the current weather visible :/
2017-12-08 08:26:10 +01:00
Andreas Shimokawa
eec0a4dc4c Amazfit Bip/Cor: Send also current temperature/condition
Closes #905
2017-12-04 22:33:53 +01:00
Andreas Shimokawa
7beb793165 Amazfit Bip: Fix installation of new 0.1.0.11 firmware
Also whitelist 0.0.9.49 and .59
2017-12-02 01:28:59 +01:00
Andreas Shimokawa
9dfde46bb0 Amazfit Bip: send condition string also for forecast days
String for forecasts are looked up from OWM condition ids, while the current condition string is already translated by WeatherNotification
2017-11-30 18:26:10 +01:00
Andreas Shimokawa
0befc1a95e Weather refactoring
No longer save an instance of ParcelableWeather2, rely on our WeatherSpec instead which now has all forecast data and save reconstructed owm weather json in Weather
2017-11-30 10:24:31 +01:00
Andreas Shimokawa
879272deb7 Weather: refactoring and support forecast for more than one day 2017-11-29 23:57:36 +01:00
Andreas Shimokawa
c325ba1a22 Amazfit Bip: show find phone events (not yet supported) 2017-11-19 23:46:58 +01:00
Andreas Shimokawa
7ffcc44378 Pebble: fix nasty crash when appmessage id is > 127
This is a regression since Gadgetbridge 0.22.0

Potentially fixes the following:

- #868
- #876
- #884

NOTE:

Java has no unisgned, java has no unsigned, java has no unsigned.
Java has no unisgned, java has no unsigned, java has no unsigned.
Java has no unisgned, java has no unsigned, java has no unsigned.
2017-11-14 22:28:54 +01:00
Andreas Shimokawa
97fda2434d Pebble: prevent potential NPE, and add more loggins in PebbleKit code 2017-11-14 22:10:40 +01:00
Andreas Shimokawa
d25da96804 Pebble: log some errors during JSON encoding/decoding 2017-11-14 22:02:00 +01:00
Davis Mosenkovs
5a77f224f4 Mi Band 2: whitelist firmware 1.0.1.54
Firmware version 1.0.1.54 is marked as recommended on wiki (Mi Band
Firmware Information).
2017-11-12 23:17:00 +01:00
Andreas Shimokawa
82ad7abf62 Mi Band 2/Bip/Cor: Only enable notification on realtime hr characteristic when live activity is used 2017-11-11 23:37:59 +01:00
Andreas Shimokawa
2ccebe07f5 Merge branch 'master' into bip-wip 2017-11-11 00:08:19 +01:00
Andreas Shimokawa
1e324acd65 Mi Band 2/Bip/Cor: Whole day HR Measurement 2017-11-11 00:04:51 +01:00
Andreas Shimokawa
e3ca3872e1 Amazfit Bip: Allow watchface flashing and whitelist Firmware 0.0.9.40 2017-11-09 22:05:01 +01:00
cpfeiffer
da7de378d3 Back out the DST handling, since it causes problems with activity fetching
Details: when we ask to fetch activity samples from date:time:tz+dst, the band,
under certain conditions, will send us back date:time:tz (without the dst offset)

We're fine with that, so we start fetching. When it's done, we take the last sample's
timestamp (still without dst offset), convert it to a unix timestamp, create a Calendar
using current tz and apply the unix timestamp. Then we send that timestamp again to the
band in order to fetch activity samples from then, but we again add the dst offset to the tz,
so send as date:time:tz+dst without changing the timestamp. That way, we may end up at the
timestamp we began with, fetching the same activity data again and not progressing.

We first need to thorougly understand how the devices behave, before we can reenable and fix
this.
2017-11-07 21:24:48 +01:00
Andreas Shimokawa
9764e8e54e try to parse timezone that comes back from huami devices
(there are other places where something like this has to be done, probably also in the other direction)

related to #869

(cherry picked from commit a58e3f66ce)
2017-11-06 23:23:11 +01:00
Andreas Shimokawa
6b56e8e568 Amazfit Cor: Fix flashing of new .res files 2017-11-06 07:17:01 +01:00
Andreas Shimokawa
a58e3f66ce try to parse timezone that comes back from huami devices
(there are other places where something like this has to be done, probably also in the other direction)

related to #869
2017-11-05 22:35:28 +01:00
Andreas Shimokawa
ac98111502 Amazfit Bip: Fix Running/Cycling activity mapping (was swapped) 2017-11-05 00:08:39 +01:00
Andreas Shimokawa
640e7f0abf Merge branch 'master' into bip-wip 2017-11-03 23:27:58 +01:00
cpfeiffer
d9de8e0cab Bip: new activity type mapping 2017-11-03 21:54:48 +01:00
cpfeiffer
8b66d0f0f7 Bip: oups, that was just for testing 2017-11-02 00:19:31 +01:00
cpfeiffer
c8b71677cd Bip: remember last time synced 2017-11-02 00:18:48 +01:00
Andreas Shimokawa
dd440f51df Amazfit Bip: add manual language selection 2017-11-01 23:32:54 +01:00
cpfeiffer
fd159b7603 Bip: improved logging, read expected number of bytes for progress monitoring during sync 2017-11-01 23:05:29 +01:00
Daniele Gobbetti
331ca6a47e Merge branch 'master' into bip-wip 2017-11-01 22:12:13 +01:00
cpfeiffer
923d7ae09d Bip: fix activity track kind constants 2017-11-01 20:02:30 +01:00
Daniele Gobbetti
72f76b60d3 Pebble: send temperatures according to the configured measurement system
Fixes #858
<Without further comments but feel free to insert a long rant about the beauty of the metric system>
2017-11-01 17:58:58 +01:00
cpfeiffer
7b3556756a Bip: activity types are different from samples' activity kind 2017-10-31 23:39:49 +01:00
cpfeiffer
f5318287c4 WIP: Bip GPS fetching, parsing, exporting
Also adjust Mi2 date/time sending wrt DST offsets
2017-10-31 23:16:39 +01:00
Daniele Gobbetti
5417c5b5f6 Change notification, and fix the connection logic:
- fix bug that caused the wrong device to be connected sometimes
- add accent color
- add battery status
- remove duplicated title
- allow to connect also before first connection (the last connected device will be used)
2017-10-30 21:37:31 +01:00
Andreas Shimokawa
94cfaadc41 Amazfit Cor: whitelist latest .res and .fw
Add a note about this being totally untested, especially scary since the new res format is different.
2017-10-25 22:26:38 +02:00
License Bot
3ea2ac6dd2 Update license headers 2017-10-25 09:29:36 +02:00
Andreas Shimokawa
02ad21cdb8 Amazfit Bip: Allow flashing of latest gps firmware and whitelist 0.0.9.26 2017-10-25 08:29:33 +02:00
Andreas Shimokawa
55cdc6d1c5 Amazfit Cor: Untested firmware update support
(refactor stuff along the way)
2017-10-24 22:01:25 +02:00
Daniele Gobbetti
e028b4d223 Pebble: add method to stop the background JS engine without disposing the webview 2017-10-23 20:47:30 +02:00
Andreas Shimokawa
83038a47ca use abstract HuamiCoordinator as base for MiBand2/HRX/Bip/Cor and separate from Mi1 Coordinator 2017-10-23 14:46:08 +02:00
Andreas Shimokawa
0f46ea2a59 Try to blindly add support for Amazfit Cor 2017-10-23 11:28:51 +02:00
Andreas Shimokawa
69619c21f6 Mi Band 2: try to add support for Mi Band HRX
Also refactors some stuff, basically moving stuff around
2017-10-23 10:28:54 +02:00
Andreas Shimokawa
ea06df4d0c Pebble: dispose webview when app with app handler has been started (misfit, morpheuz) 2017-10-23 09:23:28 +02:00
Andreas Shimokawa
f07b77f903 Mi Band 2: support app icons and textual notifications for more apps 2017-10-22 00:02:36 +02:00
Andreas Shimokawa
a809ad214d Refactor some common Huami stuff (Mi Band 2 / Bip)
This also fixes a bug where every event from the device (like not worn detection) counted as a button press
2017-10-21 22:50:28 +02:00
Daniele Gobbetti
5262c6e3d7 Add quick actions buttons to Gadgetbridge notification #759
- Disconnect button if connected
- Fetch activity if connected and supported by device
- (re)connect the last connected device if disconnected

Known bug: In the last case, if multiple devices were connected, the wrong device gets re-connected
2017-10-20 22:49:53 +02:00
Andreas Shimokawa
6603b3fa05 Merge branch 'background-javascript' 2017-10-16 23:06:36 +02:00
License Bot
8f06e36c00 Update license headers 2017-10-16 09:38:02 +02:00
Andreas Shimokawa
8243fe712e Amazfit Bip: Fix non-working notifications from Outlook, Yahoo Mail and GMail
Fixes #844
2017-10-15 22:16:54 +02:00
João Paulo Barraca
7947d94418 Merge branch 'hplus-unicode-only-first-bytes' 2017-10-15 14:28:56 +01:00
João Paulo Barraca
9b6cfd686a Implement proper HPlus Unicode encoding support and Fixes #781 2017-10-15 14:23:21 +01:00
Daniele Gobbetti
2a0388f1c6 Pebble: background webview add allowed domains array 2017-10-13 22:16:01 +02:00
Daniele Gobbetti
c4f36d1202 Pebble: background webview, address (most of) review comments 2017-10-13 21:57:22 +02:00
Daniele Gobbetti
b0c723b68a Pebble: enable legacy handlers if background JS is disabled 2017-10-10 22:10:26 +02:00
protomors
4b4e95bfe0 NO.1 F1: Alarms support. 2017-10-10 00:41:27 +02:00
protomors
895c19cc1c NO.1 F1: Moved code for setting time into appropriate method. 2017-10-10 00:41:27 +02:00
protomors
440d1e6a81 NO.1 F1: Removed some code duplication. 2017-10-05 08:05:19 +02:00
protomors
23b66459f5 NO.1 F1: Show data fetching progress. 2017-10-05 08:05:19 +02:00
protomors
bf34586a22 NO.1 F1: Check CRC before saving data. 2017-10-05 08:05:19 +02:00
Andreas Shimokawa
0eb8a0b5e2 Pebble: Fix background javascript for Pebble2/LE/Emulator 2017-10-04 23:12:49 +02:00
Andreas Shimokawa
fbef490419 Merge branch 'master' into background-javascript 2017-10-04 21:49:39 +02:00
José Rebelo
5701707e87 Mi Band 2: Change distance unit 2017-10-03 09:12:33 +02:00
Andreas Shimokawa
49bebc3440 Merge branch 'master' into background-javascript 2017-10-01 23:36:22 +02:00
protomors
b819be7db6 Now setting for measurement system is sent to the device immediately after changing. 2017-10-01 20:44:35 +02:00
protomors
7b78003ba1 NO.1 F1: Display settings.
Set time format and distance units.
2017-10-01 20:44:35 +02:00
Andreas Shimokawa
486596b1a8 Pebble: support setting the other non-metric system crap for the pebble
(pebble health has to be activated again in app manager after changing the option)

This also moves the fake:// uri handling code from PebbleIoThread to PebbleSupport
2017-09-30 23:27:19 +02:00
Andreas Shimokawa
6d8ffad55c Call onSetConfiguration() in listener if measurement system gets changed in preferences
(And implement onSetConfiguration() for HPlus)
2017-09-30 22:45:45 +02:00
Andreas Shimokawa
e6d939e5cb Merge branch 'master' into background-javascript 2017-09-28 17:31:45 +02:00
cpfeiffer
0687564bbb Remove unused, commented out code 2017-09-28 17:31:40 +02:00
Andreas Shimokawa
7d05682d8e Amazfit Bip: whitelist firmware 0.0.9.14 2017-09-28 16:20:22 +02:00
Andreas Shimokawa
3d09b9dc97 Amazfit Bip: Switch language on the watch automatically according to the phone locale
Supported:
- Simplified Chinese
- Traditional Chinese
- English
2017-09-28 16:04:06 +02:00
cpfeiffer
770c8a482d Bip: pass the right logger instance 2017-09-27 21:46:23 +02:00
Andreas Shimokawa
0a9664d5ec Merge branch 'master' into background-javascript 2017-09-25 23:50:08 +02:00
cpfeiffer
32d5ceb78f Make update notification dismissable on error conditions
good idea, @joserebelo #821
2017-09-25 23:25:04 +02:00
cpfeiffer
976942757f Make sure we get a stacktrace in the log
(so we don't have to guess where it happened) #807
2017-09-25 23:25:04 +02:00
Daniele Gobbetti
e8ae47de79 Pebble: Make background JS support toggle-able
- Add preference to enable background JS (default disabled)
- Remove the dummy activity used to create the webview, use ExternalPebbleJSActivity instead
- Add layout for legacy configuration, used if background JS is not enabled
- Create the view upon connecting, not when launching the application
- Remove the generic helpers used to find out if any device would need the background webview
- Drastic refactoring of WebviewSingleton moving internal classes in a new package "webview" in service/devices/pebble
2017-09-25 17:12:35 +02:00
Daniele Gobbetti
af6271a428 Merge branch 'master' into background-javascript 2017-09-25 11:21:11 +02:00
Daniele Gobbetti
c74ea64b70 Pebble: Address the missing remarks of #807
- Separate the getAudioPlayer method
- Replace the println calls with proper LOG statements
2017-09-25 11:09:45 +02:00
cpfeiffer
3c9fab0471 Fix fw update notification being stuck at the end
Fixes #821
2017-09-25 00:03:40 +02:00
Andreas Shimokawa
e28085e6af Mi Band 2/ Bip: Do not send user info if not set up 2017-09-24 23:03:11 +02:00
Andreas Shimokawa
717eb6ba58 Amazfit Bip: Whitelist fw 0.0.8.97/.98, fix detection for newer alm and cep files 2017-09-24 22:44:18 +02:00
Andreas Shimokawa
46b50515f3 Mi Band 2/Bip: set user info from user attributes 2017-09-23 00:51:57 +02:00
Andreas Shimokawa
2be84435ce Mi Band 2/Bip: implement setting user info (experimental, disabled) 2017-09-23 00:09:52 +02:00
Frank Slezak
6ec1555178 Add support for dynamic Pebble background colors (#819)
Pebble: Add support for dynamic Pebble background colors
- Add a couple additional icon types
  - Add Lighthouse (currently unused)
  - Add Transit (public transportation app)
- Tweak the colors on existing icon types
- Implement logic to grab primary (vibrant) color from app logo
  - The color will be used when displaying a notification for an app
    that does not have any configs bound to it.
- Alter NotificationType to support a color (named pebbleColor)
- Alter the Pebble notification poster to listen to the color from
  the notification
- Alter the DeviceCommunicationService to allow for color passthrough.
- Add logic to convert HEX or Integer representations of RGB888 colors
  to Pebble RGB222 format.
- make the package name retrieved lowercase.

Fixes: #815
2017-09-19 13:24:31 +02:00
Andreas Shimokawa
f5b8bdb1c2 add missing file 2017-09-18 23:26:34 +02:00
Andreas Shimokawa
412153364e Amazfit Bip: initial support for fetching debug logs from the watch
TODO:
- fix wrong toast about start time
- properly create an API for this kind of stuff (currently uses testNewFunction())
2017-09-18 23:24:11 +02:00
cpfeiffer
35e59d0add Bip: WIP for ashimokawa 2017-09-17 22:36:49 +02:00
Andreas Shimokawa
37da178365 Amazfit Bip: log "step goal reached" event 2017-09-16 19:53:06 +02:00
Andreas Shimokawa
9471131490 Amazfit Bip: log more events coming from the watch 2017-09-16 12:33:33 +02:00
Andreas Shimokawa
e5a8ca5374 Amazfit Bip: more debug output for events coming from the watch 2017-09-16 00:20:33 +02:00
Andreas Shimokawa
d49db12a0d Amazfit Bip: Allow flashing of GPS CEP and Almanac, whitelist .96 fw 2017-09-15 11:44:24 +02:00
Andreas Shimokawa
3301194e75 Consolidate duplicate Mi2 / Bip icon definition
Also handle some more recently added icons
2017-09-14 10:15:14 +02:00
Andreas Shimokawa
99d873a178 Merge branch 'master' into background-javascript 2017-09-13 21:51:55 +02:00
License Bot
a10fc8ad4e Update license headers 2017-09-12 12:39:15 +02:00
Andreas Shimokawa
acf779a8e4 Amazfit Bip: fix long messages not being displayed at all 2017-09-11 23:20:57 +02:00
Andreas Shimokawa
b87d9d649d Amazfit Bip: Whitelist FW 0.0.8.88 2017-09-11 23:05:49 +02:00
Michal Novotny
05d0625b68 Mi Band 2: Implement multiple button actions
This enables option for multiple button actions according to the "Delay after button action". This broadcast is being sent to the intent
along with button_id extra identifying how many times have the pass been done.

By pass defined number of button presses is meant.
2017-09-10 23:02:13 +02:00
Quallenauge
851e47f550 Add support for EXRIZU K8 smartband.
The device is compatible to HPLUS protocol.
2017-09-10 22:57:32 +02:00
Daniele Gobbetti
6def9dc07e Pebble: allow to translate quick actions sent to the watch
Fixes #789
2017-09-10 17:57:18 +02:00
Gabe Schrecker
6f702778f4 Support control of multiple media playback applications (#807)
* Added Lollipop only detection of the playing media package, using MediaSessionManager. Replicates funtionality of the Official Pebble client.
2017-09-10 15:17:21 +02:00
protomors
273c2ddbfd NO.1 F1: Support for heart rate measurement. 2017-09-10 14:45:09 +02:00
protomors
918cc75f6c NO.1 F1: fetch sleep data. 2017-09-09 18:12:39 +02:00
cpfeiffer
e9a68e70b5 Make Mi2 FetchOperation reusable 2017-09-09 00:02:30 +02:00
Andreas Shimokawa
3e05f8ff4a Merge branch 'master' into background-javascript 2017-09-05 22:49:07 +02:00
Michal Novotny
fcf9be877a Support for button actions on Mi Band 2 device (#793)
Implement button actions for MiBand 2
2017-09-05 22:37:41 +02:00
Andreas Shimokawa
f0a9c57937 Merge branch 'master' into background-javascript 2017-09-05 10:21:45 +02:00
Andreas Shimokawa
365fcace06 Fix merge 2017-09-05 10:20:37 +02:00
cpfeiffer
a93ace255b Don't crash, don't queue a transaction twice!
Fixes #794
2017-09-04 23:39:40 +02:00
cpfeiffer
e44eb03698 Amazfit Bip: avoid sending weather info when not initialized 2017-09-04 23:23:51 +02:00
cpfeiffer
1ddea9268d Amazfit Bip: request GPS fw version earlier
(to avoid recreation of DeviceAttributes because fw2 is sometimes available and sometimes not.)
2017-09-04 23:19:53 +02:00
Andreas Shimokawa
a911ba5423 Merge branch 'master' into background-javascript 2017-09-04 21:08:36 +02:00
Sami Alaoui
f6ce0c1a0e Add initial support for Teclast H30
Scan and connection, battery level, firmware version, date and time sync
(along with some other currently hardcoded settings), notification
support, alarm support, and some more.
2017-09-04 20:59:09 +02:00
protomors
b8c5a44709 Removed interpolation of data samples. Added intensity column for activity chart. 2017-09-04 20:38:20 +02:00
protomors
22a15c631c Notify user about failed operations. 2017-09-04 20:38:20 +02:00
protomors
ecd9964c5b NO.1 F1: Fetch steps data. 2017-09-04 20:38:20 +02:00
cpfeiffer
f5934dfb3b Don't crash when no firmware version available yet 2017-09-03 23:56:30 +02:00
cpfeiffer
55bf9ef784 Some logging 2017-09-03 23:51:20 +02:00
Daniele Gobbetti
d669d3b325 Make NoF1 compatible with background js branch 2017-09-03 17:09:19 +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
Andreas Shimokawa
cfc310692f Amazfit Bip: Fix call notification with unknown caller 2017-09-03 14:37:32 +02:00