1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-02 19:36:14 +02:00
Commit Graph

97 Commits

Author SHA1 Message Date
José Rebelo
6569cd74ba Garmin: Allow high MTU 2024-04-25 18:09:36 +02:00
Marcel Alexandru Nitan
2190c82ed7 feature: Sleep as android support
Implement support for Sleep As Android with an usable example for ZeppOs
devices

Sleep as Android documentation:

https://docs.sleep.urbandroid.org/devs/wearable_api.html

Signed-off-by: Marcel Alexandru Nitan <nitan.marcel@protonmail.com>
2024-04-20 12:15:42 +03:00
José Rebelo
81aef0bf35 Add support for multiple weather locations
Introduce the concept of primary and secondary weathers:

* Primary weather keeps the same behavior as previously across all weather providers, so it's non-breaking. This location is not necessarily the current location, just the primary weather location set by the user.
* The GenericWeatherReceiver now has a new extra WeatherSecondaryJson, that receives a json list with secondary weather locations.

It's guaranteed that the primary weather always exists, so the list of WeatherSpecs provided to devices is never empty. Update all support classes accordingly.
2024-03-29 21:10:40 +00:00
Daniel Dakhno
00c0a8e897 Device connection: added device scan reconnection logic 2024-03-05 00:11:32 +01:00
Daniel Dakhno
264b6470cd Revert "Device connection: added basic code for scan-reconnect"
This reverts commit adf55fea93.
2024-02-12 23:30:32 +01:00
Daniel Dakhno
adf55fea93 Device connection: added basic code for scan-reconnect 2024-02-12 23:28:10 +01:00
FYG_license_bot_ignore_me
4c7476845b Update license headers and CONTRIBUTORS file 2024-01-10 19:01:48 +01:00
Andreas Shimokawa
ea0817f7b6 Use TextUtils.join intead of String.join, to make at least the linter happy
It is not clear to me if this would get desugarized anyway, but linter says needs API 26
2023-12-16 19:37:40 +01:00
José Rebelo
4dbf9bb8ac Huami: Toggle phone silent mode from band 2023-12-11 10:50:31 +00:00
José Rebelo
ef73ea1bd5 Make LimitedQueue generic 2023-12-10 10:30:27 +00:00
José Rebelo
4d12ac93e7 Allow multiple device actions to be triggered for the same event 2023-12-09 11:40:28 +00:00
José Rebelo
25196a932e Allow toggling DND through device actions 2023-12-09 11:01:55 +00:00
MrYoranimo
435d41aca0 Huami/Xiaomi: centralize handling of device state events
Gadgetbridge can be configured to perform an action when a
Huami device is taken off or the user was detected to fall asleep or
wake up. This functionality was specific to Huami devices, but this
changeset moves this upstream to the AbstractDeviceSupport class in
combination with new GBDeviceEvents.

Now that the ADS has centralized support for this functionality, the
same logic can be used for other devices. In this case, an
implementation is added for supported Xiaomi devices.
2023-12-09 00:20:22 +01:00
foxstidious
40af20a176 Removed call to start intent if no companion, defaulted companion preference to true, and reordered casio alert preferences to match watch order. 2023-11-25 22:52:26 +00:00
foxstidious
6be7f7c9cc Fixed find phone on, added preference to preview messages on Casio GDB-200 2023-11-25 22:52:26 +00:00
José Rebelo
8531cfb0a1 Mi Band 8: Start handling config changes 2023-11-25 21:16:33 +00:00
Davis Mosenkovs
176e81f1c0 Display alias in low battery notification 2023-11-16 21:23:35 +00:00
ahormann
28e673415f Support for Femometer Vinca 2 and HealthThermometerProfile (#3369)
Co-authored-by: ahormann <ahormann@gmx.net>
Co-committed-by: ahormann <ahormann@gmx.net>
2023-10-15 13:37:41 +00:00
Arjan Schrijver
557bfea35c Add lint baseline, enable linting on CI, fix some reported errors (#3291)
This PR:
- fixes some errors reported by `gradlew lint` and the Android Studio "Code Inspection" tool
- adds a snapshot file `lint-baseline.xml` of the remaining lint errors and warnings to be used by the linter as baseline
- adds a job for CI to run `gradlew lint` on every build

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3291
Reviewed-by: José Rebelo <joserebelo@noreply.codeberg.org>
Co-authored-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
Co-committed-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
2023-09-11 09:17:04 +00:00
José Rebelo
180ed42ee1 Bangle.js: Handle fw and hw versions 2023-08-09 09:09:52 +01:00
José Rebelo
12dd9651e7 Fix opening screenshots from notification on external apps 2023-07-17 00:09:10 +01:00
José Rebelo
fea3bf50a4 Zepp OS: Add loyalty cards integration with Catima 2023-07-03 23:19:19 +01:00
José Rebelo
5f0689d2e1 Make screenshot notification strings translatable 2023-06-14 21:02:27 +01:00
José Rebelo
5df25effba Make screenshot notifications high priority 2023-06-14 21:02:27 +01:00
José Rebelo
531aef61fd Move screenshot encoding to PebbleProtocol 2023-06-14 21:02:27 +01:00
Ganblejs
7d1de4a5e8 Bangle.js: Bump flavor targetSdkVersion to 31
This also touches parts of the app not only used for bangle.js.
E.g. pending intents gets new flags from SDK 23 inclusive.
Bluetooth permissions are updated to work on SDK 31.
Permission handling is updated to the new way for doing it with
introduction of a new function. This is called for newer sdk versions.

bump Bangle.js flavor targetSdkVersion to 31

update comments re SDK 31

set the 'exported=true' I introduced to false instead - except for three places

add uses-permission for handling bluetooth in order to work on api >30

add if-blocks adding FLAG_IMMUTABLE to PendingIntents on api >30

add link to bluetooth documentation

Add comment to banglejs manifest. Add requirement annotation to ControlCenterv

bump compileSdkVersion to 31

add "OpenAppSettings" permission popup while working out individual permission popups on android 13

if SDK < 31 do permissions one by one, else send user to app info page to switch permissions manually

working solution, but needs cleaning

do some cleaning, not done though

remove some logging

remove import Log

tweak and remove toasts in new permissions handling

Change conditions `> Build.VERSION_CODES.Q` to `>= Build.VERSION_CODES.R` matching the style used everywhere else

Revert "Change conditions `> Build.VERSION_CODES.Q` to `>= Build.VERSION_CODES.R` matching the style used everywhere else"

This reverts commit 2929629ff43fbb685eb3d15e42459f321f68fa11.

Revert "add if-blocks adding FLAG_IMMUTABLE to PendingIntents on api >30"

This reverts commit ed8e1df7bb8b71fee745fbf9d10747d47c8f6cb8.

Pending intents gets `PendingIntent.FLAG_IMMUTABLE` if `(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)`.

Bangle.js: undo `@RequiresApi` code R

... to remove error in Android Studio where declared required api was
higher then minSDK version.

Use FLAG_MUTABLE for reply to test notification

This should fix Gadgetbridge crashing when replying to the test
notification from the debug activity. As reported here:
https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2924#issuecomment-917282

Change to use FLAG_IMMUTABLE/_MUTABLE from SDK 23

... as suggested by Android Studio. This is supposed to make the app
more secure by not allowing certain changes to pending intents where
they are not expected. If I understood correctly.

Add PendingIntentUtils class to manage mutability
2023-05-30 00:25:20 +02:00
Andreas Shimokawa
55e7f6595b fix build after rebase 2023-05-21 22:50:52 +02:00
Andreas Shimokawa
48dee7486f add onSetNavigationInfo() to device interface 2023-05-21 22:50:52 +02:00
José Rebelo
2b6a79f462 Zepp OS: Manage contacts on watch 2023-05-17 23:43:29 +01:00
Arjan Schrijver
845887ddeb Fossil/Skagen Hybrids: Add app/watchface downloading from watch to app manager 2023-01-07 23:07:34 +01: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
José Rebelo
9c82180930 Zepp OS: Do not change GATT Callback unless explicitely set 2022-10-23 10:11:23 +01:00
José Rebelo
addf7ff6a6 Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
Arjan Schrijver
951772626c Fossil Hybrid HR: Show app versions 2022-07-04 17:12:41 +02:00
José Rebelo
96d709bea1 Allow devices to update info, preferences and state 2021-12-20 11:29:21 +01:00
vanous
788f4d8ae0 Add support for multiple batteries per device 2021-11-02 14:37:47 +01:00
Dmitriy Bogdanov
e28beaae48 Refactoring: localize notification handling in GB
* Handle all notifications via GB.
* Create all notification channels in one place.
* Lazily init notification channels.
* Re-create notification channels to update their localized names.
2021-05-29 23:17:39 +02:00
vanous
69d9695eac Use Gb DBaccess for Battery level storing 2021-03-05 11:57:00 +01:00
vanous
3e04778696 initial battery level collector and simple chart 2021-02-04 21:21:38 +01:00
License Bot
1b5402dcb4 update license headers 2021-01-10 23:38:13 +01:00
Andreas Shimokawa
0d49eaaf9e Pebble: move canned message to per-device settings (including migration)
This also cleans up some useless preferencehandlers that only change summary by
using app:useSimpleSummaryProvider="true" for EditText
2020-10-13 00:27:22 +02:00
TaaviE
3c842bd441 Made the find phone activity start instantly when allowed 2020-10-06 22:00:42 +03:00
TaaviE
ad30c528e5 Fixed a bug caused by incorrect PendingIntent.getActivity usage 2020-10-06 20:35:26 +03:00
TaaviE
6cd59fbd24 Refactored all pairing and bonding activities (#1989)
Fixed a few warnings

Refactored all bonding and bonding activities

Co-authored-by: TaaviE <taavi.eomae+github@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/1989
2020-08-28 15:38:18 +02:00
Pauli Salmenrinne
8cfdd62eb4 FIX: Fix find-my-phone for android 10 with notifications. 2020-03-12 09:26:22 +01:00
License Bot
d6fa5d0dd5 Update license headers 2020-01-09 10:44:32 +01:00
FYG_license_bot_ignore_me
8e5c4b4602 Update license headers 2019-11-23 21:53:22 +01:00
Andreas Shimokawa
fcc9ad8f95 Widget: Also update for Pebble Misfit and Morpheuz
This commit also removes GBDeviceEventSleepMonitorResult since it was unused and highly Morpheuz specific
2019-09-16 22:48:21 +02:00
Andreas Shimokawa
876515f1fd Amazfit Cor: support custom emoji font
This commit refactors code and implements a custom device specific string
filter, which does nothing by default.
The implementation in HuamiSupport does the custom emoji conversion.

The setting has been moved from devicesettings_amazfitbip.xml to an extra file
As soon as there is a custom font for Mi Band 2/3/4 it is sufficient to add
"devicesettings_custom_emoji_font.xml" to the list of supported settings
in the appropriate coordinator and everything will work.
2019-09-14 00:05:39 +02:00
Andreas Böhler
dc22aabb1c Add support for muting an incoming call 2019-05-25 15:56:21 +02:00