1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-08-25 08:40:43 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge
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
..
activities [Banglejs] Send phone location data to banglejs, which can be used as gps data (#2992) 2022-12-12 07:48:19 +00:00
adapter Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
capabilities Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
contentprovider update license headers 2021-01-10 23:38:13 +01:00
database Zepp OS: Add World Clocks 2022-11-07 10:31:41 +01:00
deviceevents Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
devices [Banglejs] Send phone location data to banglejs, which can be used as gps data (#2992) 2022-12-12 07:48:19 +00:00
entities add missing AbstractFitProActivitySample from entities (excluded by gitignore) 2021-09-24 10:00:36 +02:00
export add UUID to to GPX with opentracks namespace 2021-01-17 00:07:55 +01:00
externalevents [Banglejs] Send phone location data to banglejs, which can be used as gps data (#2992) 2022-12-12 07:48:19 +00:00
impl Drastic rewrite of discovery activity. 2022-11-27 18:59:22 +01:00
model Revert "Sony LinkBuds S: Initial support" 2022-12-09 21:27:49 +00:00
service [Banglejs] Send phone location data to banglejs, which can be used as gps data (#2992) 2022-12-12 07:48:19 +00:00
util Revert "Sony LinkBuds S: Initial support" 2022-12-09 21:27:49 +00:00
GBApplication.java Drastic rewrite of discovery activity. 2022-11-27 18:59:22 +01:00
GBEnvironment.java Update license headers 2020-01-09 10:44:32 +01:00
GBException.java update license headers 2021-01-10 23:38:13 +01:00
LockHandler.java Update license headers 2020-01-09 10:44:32 +01:00
Logging.java Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
LoggingExceptionHandler.java update license headers 2021-01-10 23:38:13 +01:00
SleepAlarmWidget.java Remove KitKat support 2022-09-10 12:04:16 +02:00
Widget.java Allow DeviceService to target a specific device 2022-08-05 21:34:15 +02:00