1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-21 04:20:27 +02:00
Commit Graph

93 Commits

Author SHA1 Message Date
José Rebelo
515b9efce8 Zepp OS: Fix calendar sync for Zepp OS 2 2023-08-14 18:40:39 +01:00
José Rebelo
180ed42ee1 Bangle.js: Handle fw and hw versions 2023-08-09 09:09:52 +01:00
José Rebelo
a95820d09e Bangle.js: Fetch activity data 2023-08-08 22:11:14 +01:00
José Rebelo
2bda160fb5 Bangle.js: Allow enable/disable alarms 2023-08-06 00:23:05 +01:00
Simon Sievert
0ae14fb80a
Bangle.js: Put JSON keys in quotes
this allows the watch to work with gadgetbridge while 'programmable' is set to off
2023-07-29 15:03:47 +02:00
Richard de Boer
8e270fcbf7
Bangle.js: refactoring
Extract handling of packet types with large code blocks.
Incidentally fixes "intent" packets launching a full calendar sync if
intents are disabled in GB settings.
2023-07-11 20:46:50 +02:00
Gordon Williams
88e0b9543d Bangle.js: HTTP request XPath can now return Arrays.
More robost toJSON that deals with unicode and null
Log messages when converting words to images so we can debug when words are being converted that shouldn't be
2023-06-30 11:34:53 +01:00
Gordon Williams
0e0f72410a Bangle.js: fix mixup of navigation left slight&sharp icons 2023-06-29 14:49:22 +01:00
Gordon Williams
d82ba7a04c Bangle.js: Send the timestamp of our last activity sample to the Bangle on connect, so that it can update us on missing activity samples 2023-06-26 11:39:29 +01:00
Gordon Williams
2aac797dec Remove some build warnings in BangleJSDeviceSupport 2023-06-26 11:20:50 +01:00
Gordon Williams
8e010bc6dd Stop BangleJSDeviceSupport repeatedly calling GBLocationManager.stop and spamming the log with "Stop location updates" 2023-06-26 11:15:54 +01:00
Gordon Williams
94cd7523db Ensure we now escape chars in the unicode start range. With Bangle.js ~2v18.20+ we added Unicode support, but if we're sending non-unicode chars in the unicode range it will confuse Espruino 2023-06-26 11:07:38 +01:00
Lukas
6e3ce89ae5 add attribute to set the source of the gps signal 2023-06-22 21:37:55 +00:00
Lukas
6da6baa5e6 Add switch to control if the GPS chip should be used to locate the location 2023-06-22 21:37:55 +00:00
Andreas Shimokawa
f80b873866 Prefs: make allow high MTU default to true.
It is 2023, it should work, if not it can be turned off.

For newer devices with big firmwares and apps (like Mi Band 7), people just wonder how slow Gadgetbridge installs stuff...
2023-06-14 16:44:51 +02:00
Damien Gaignon
be575af314 Add BTBR service 2023-06-13 12:06:13 +00:00
Ganblejs
20de001e49 Bangle.js: Add more weather data sent to watch
Specifically UV Index, the day max and min temp, probability of rain.
Inspired by PR #3095

Bangle.js:Send UV Index with one decimal point
2023-06-09 20:55:32 +02:00
Gordon Williams
1fa8936544 Google Maps: Added more recognised icons - needed another enum for going all the way around a roundabout 2023-06-09 13:59:05 +01:00
Gordon Williams
735f27d5bf Add Navigation handling to Bangle.js
Add extra 'ETA' field to NavigationInfoSpec
Allow Local Notifications from Google Maps to be parsed into NavigationInfoSpec by GoogleMapsNotificationHandler

Moved notification handling after blacklist check as per https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3136#issuecomment-920095

Ensure we don't create a nav message for 'Location Shared with you' messages.
Recognise 'ft' as a distance unit and convert accordingly

Google Maps navigation: Adding new recognised icons, and removing warnings/errors from file
2023-06-09 08:50:40 +01:00
Gordon Williams
b334773856 Bangle.js: fix the rare case where we're converting an emoji/unicode to a bitmap but it doesn't have a width/height - we just create a bitmap of min. 1px 2023-06-08 12:36:12 +01:00
Gordon Williams
e59375242e Bangle.js: Allow an activity sample to have a time specified - first steps in allowing Bangle.js to send 'missed' health data 2023-06-06 20:25:58 +01:00
Richard de Boer
7e1685f5f9 Bangle.js: fix memory leak from HTTP requests
Every call to Volley.newRequestQueue() creates a new global thread pool,
which isn't automatically cleaned up once the request completes.
With this commit we create a RequestQueue around on first use, and reuse
it for subsequent requests.
2023-06-05 10:09:28 +00:00
Martin Boonk
fd9efdcb72 Bangle.js: Match default interval from resource file 2023-05-22 22:17:10 +00:00
Martin Boonk
88161bed91 Bangle.js: Inform user if GPS set to off in settings 2023-05-22 22:17:10 +00:00
Martin Boonk
d4bcbc52fb Bangle.js: Fix typo 2023-05-22 22:17:10 +00:00
Martin Boonk
a57a8cc7ca Bangle.js: Fix location listener not being cleaned up when waiting for reconnect 2023-05-22 22:17:10 +00:00
Gordon Williams
757e36ebd6 Bangle.js: Add message size limitation to Calendar and Messages - stops huge data streams being sent out esp for calendar events 2023-05-19 10:46:37 +01:00
Gordon Williams
2a5cd559d5 Fix issue updating timezone in setting.json if the timezone is zero (https://github.com/espruino/BangleApps/issues/2575) 2023-03-21 15:08:59 +00:00
halemmerich
90771891a5 Bangle.js: Additional values for GPS event (#3026)
This tries to use bearing and number of satellites if available. ~~Bangle.js watch currently sets course=NaN in it's implementation of the GPS event handler, so to be of use this needs a small change there as well: [https://github.com/espruino/BangleApps/pull/2504](https://github.com/espruino/BangleApps/pull/2504)~~ Change has been merged.

Please advise on needed changes or oversights, thanks :)

Co-authored-by: Martin Boonk <martin@boonk.info>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3026
Co-authored-by: halemmerich <halemmerich@noreply.codeberg.org>
Co-committed-by: halemmerich <halemmerich@noreply.codeberg.org>
2023-02-14 10:45:58 +00:00
Albert
56ec206f5b [Bangle.js] check if globalUartReceiver is set and move its removal to separate method 2023-02-14 10:43:39 +00:00
Albert
2e06d7afa5 [Bangle.js] remove uart.tx intent-listener on dispose 2023-02-14 10:43:39 +00:00
Lukas
25be7cf12d Banglejs: change json key to lon when sending location data to watch 2023-01-30 21:40:30 +01:00
Gordon Williams
521edc4332 Bangle.js: Increase default realtime HRM/step interval to 10 seconds
Disable manual heart rate measurement - the current implementation in Gadgetbridge seems not really compatible with Bangle.js. There's no way to turn the HRM off when the window is closed, and HRM samples from *any* device would appear to be shown - not just the one that HRM info was requested on
2023-01-26 10:31:13 +00:00
Gordon Williams
b16464b3b6 Bangle.js stop 'toast' warning message appearing when starting the app loader. Fix https://github.com/espruino/BangleApps/issues/2496 2023-01-13 14:28:38 +00:00
Gordon Williams
f3fa01dfba Bangle.js: Quick tweak to stop us sending bitmaps for common characters that already had good enough equivalents 2023-01-11 13:45:46 +00:00
Arjan Schrijver
b1d03e9f7a Clean up duplicated unimplemented methods from device support classes
Moved to AbstractDeviceSupport so each device support class can override them if required. This change helps to keep the code base clean by not requiring every (Device)Support class to implement these methods even when they don't need them.
2023-01-05 22:11:32 +01:00
Gordon Williams
6d35ca3ec0 fix gbDevice==null errors again, and avoid spamming log with ACTION_DEVICE_CHANGED messages 2022-12-12 16:10:14 +00:00
LukasEdl
abf19f2b6c [Banglejs] Send phone location data to banglejs, which can be used as gps data (#2992)
Since the PR #2961 aswell as #2976, i pushed the changes to this pr.

Original text:

With this PR, the gadgetbridge app sends the current locationd data, obtained from the gps or network provider, to a connected banglejs device as an "gps" event.

The bangle device can use this data instead of the internal gps data. Therefor saving battery energy, since the gps chip is one of the biggest energy consumers.

Furthermore it enables the banglejs device to use the location data, based on the network with which the phone is currently connected. This would be usefull if there is no gps signal.

Updates:

I added a network provider so that it is possible to use the network location. I also overload the start method of GBLocationManager so that it is now possible to select which provider should be used to get the data (currently GPS or Network) and to set a interval to determine how often the update should be run.

For the banglejs device i added a switch to enable the sending of gps data. I also added a setting, to set the interval on how often the gps data is being updated. This allows to throttle the updates of the gps data and therefore saving energy of the smartphone batterie.

To further save energy, the app now requestes the current status of the gps from the banglejs and only sends data, if the gps of the banglejs is turned on.

In the PR #2976 I also moved the settings to the device settings of the banglejs and i moved the logic to the onLocationChanged method of the GBLocationManager.

Co-authored-by: Lukas <lukas.edi@gmx.net>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2992
Co-authored-by: LukasEdl <lukasedl@noreply.codeberg.org>
Co-committed-by: LukasEdl <lukasedl@noreply.codeberg.org>
2022-12-12 07:48:19 +00:00
Gordon Williams
0dd0b2bead Bangle.js flow control. If the Bangle is busy and unable to accept more data, Gadgetbridge will now pause sending until the Bangle is ready for more.
This works by adding the ability to pause the sending of data from the Bluetooth LE queue. While BtLEQueue is modified, unless setPaused(true) is called it behaves exactly as before so shouldn't cause any issues.
2022-12-12 07:43:20 +00:00
Gordon Williams
bb1323dd61 Ensure we automatically convert unrenderable chars the title/description of calendar events 2022-12-12 07:42:22 +00:00
Gordon Williams
e003e0b672 Fix the code that forces a calendar sync on Bangle.js - previously sending "android.intent.action.PROVIDER_CHANGED" didn't work 2022-12-12 07:42:22 +00:00
Gordon Williams
55cbac5f8f Squashing some build warnings. Fix for potential corruption in bitmaps that weren't exactly n*8 bits long 2022-10-18 11:52:08 +01:00
Gordon Williams
eac7edfea1 Bangle.js - small tweak to fix occasional NullPointerException reported via Play Store 2022-10-14 09:48:55 +01:00
Ganblejs
c31471c9b8 Bangle.js: extending intents functionality (fix). Use startForegroundService only on API level 26 and up. 2022-09-27 17:09:55 +02:00
Andreas Shimokawa
7985f8c703 Bangle.js: some minor code cleanup
Also improves performance when scanning for emoji (if one has been found stop scanning for more)
2022-09-27 15:51:41 +02:00
Gordon Williams
abec54fb1a Bangle.js: Added PATCH HTTP request type, and fix for VolleyError UnsupportedOperationException when supplying custom headers 2022-09-27 11:11:52 +02:00
Ganblejs
82315b3281 Bangle.js: extending intents functionality (continuation)
Add support for (explicit) service intents.
Add support for setting flags for intents.
Add support for setting multiple categories for intents.
Add ability for Gadgetbridge to wake the Android device and leave the
 lock screen to start activities when it is sleeping. A new activity
 'WakeActivity' is used for this. (Must use 'trusted device' in Android)
Add dismiss-button to 'display over other apps' permission pop up.
Bangle.js can send "gadgetbridge" as package info to accomodate the
 different GB build variants/flavours.
Use only getContext() and not getApplicationContext() when executing
 the intents.
2022-09-19 21:52:40 +02:00
Gabriele Monaco
004355f69f Added calendar color and name to CalendarEventSpec
Tested on banglejs
2022-09-08 18:00:27 +02:00
Gordon Williams
87c61948a6 Bangle.js: smooth out battery level readings 2022-09-06 21:13:37 +02:00
Gordon Williams
0f052f5467 Bangle.js: Fix null pointer issue if headers not supplied for HTTP request 2022-08-24 20:26:25 +01:00