This affects available features (eg. Alexa). Defaults to the previous
value of "unknown" for now, and no UI. Alexa requires a region where it
is available, such as Germany ("de").
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>
- get rid of pre-lollipop BLE discovery (nowadays we support only lollipop and above) and related preference
- get rid of the sequenced BT-then-BLE-scan that wasn't working reliably anyway and was causing a recursion
- add a caching layer for already processed devices (the same device is found multiple times during discovery)
- add a caching layer for device name in GBDeviceCandidate (many coordinators will ask for it, and it's a very expensive operation)
Mostly copied from the Buds Pro as those earbuds have a similar feature set and mostly the same protocol.
Co-authored-by: narektor <narektor@noreply.codeberg.org>
Co-committed-by: narektor <narektor@noreply.codeberg.org>
Using objects instead of primitives, reading from correct JSON
Added unregisterReceiver for GenericWeatherReceiver
Added GenericWeatherReceiver to manifest
This adds the functionality of long-pressing the launcher icon for directly connecting a device.
The devices are automatically added as shortcuts when they are being connected.
The helper library handles the maximum number of shortcuts automatically.
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.
...to allow intents to start activities on the android device.
Add pop-up asking for permission to "Display over other apps"
Add info for intents on Bangle.js
Add message to display on "Display over other apps" permission pop-up
Move permission to display over other apps to main build variant/flavor.
fix getting permission for display over other apps.
Clarify that permission to display over other apps is mainly for Bangle.js.