1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 11:33:19 +02:00
Commit Graph

375 Commits

Author SHA1 Message Date
Lukas
9ef0e6044c replace GPS_PROVIDER with NETWORK_PROVIDER to retrieve the gps data from the network 2023-01-07 12:09:42 +01:00
José Rebelo
4a0e67cb30 Add Intent API to trigger activity sync and DB export 2022-12-15 14:17:03 +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
José Rebelo
003dd6ce32 Allow media notifications to bypass app list 2022-10-29 15:20:03 +02:00
vanous
6f01dd6514 Add MY_PACKAGE_REPLACED receiver to manifest, to re-connect after update, especially for users of Nightly releases. Fix #2855 2022-10-13 21:29:01 +02:00
TylerWilliamson
a86894b052 Added GenericWeatherProvider, shows "Activate" and "Deactivate" regardless of if "Weather Notification" is installed
Using objects instead of primitives, reading from correct JSON

Added unregisterReceiver for GenericWeatherReceiver

Added GenericWeatherReceiver to manifest
2022-10-02 17:58:03 +02:00
Gabriele Monaco
63444740d2 Reverted CalendarReceiver to use GregorianCalendar 2022-09-27 18:37:43 +02:00
José Rebelo
11716c906b Allow 3rd party apps to set device settings 2022-09-25 11:55:48 +02:00
Gabriele Monaco
c2783ae82e Fixed number of days for all-day events
All events were forced to last 1 day, now longer events have their actual durations
2022-09-25 11:47:01 +02:00
José Rebelo
c36857f063 Huami: Set OpenTracks track category and icon 2022-09-19 11:50:44 +02:00
Arjan Schrijver
7ae2ec1dcf Fossil Hybrid HR: Set OpenTracks track category and icon to workout type selected on watch 2022-09-12 11:22:04 +02:00
Andreas Shimokawa
969164ba5d Remove KitKat support 2022-09-10 12:04:16 +02:00
Gabriele Monaco
004355f69f Added calendar color and name to CalendarEventSpec
Tested on banglejs
2022-09-08 18:00:27 +02:00
Gabriele Monaco
e6411d8f68 Improved mechanism for allDay calendar events
Using newer java apis instead of GregorianCalendar and fixed wrong date
on negative time zones
2022-09-08 18:00:27 +02:00
gnufella
29e0879381 Add title check as well to notification filter 2022-09-08 17:59:05 +02:00
José Rebelo
25668bb762 Prefer long notification text by default 2022-09-05 23:57:19 +02:00
José Rebelo
42853df591 Fix Skype notifications 2022-09-01 22:26:48 +01:00
José Rebelo
9f0169542e Huami: Use system time for GPS timestamps 2022-08-30 08:36:14 +02:00
José Rebelo
5637a2bc45 Add option to ignore low priority notifications 2022-08-28 13:12:09 +02:00
José Rebelo
5920b26aab Do not remove newline and whitespace characters from notification content 2022-08-28 13:04:14 +02:00
José Rebelo
a02d54523a Prefer big text for Gmail notifications 2022-08-28 13:04:14 +02:00
José Rebelo
ba565df088 Xiaomi Smart Band 7: Initial support 2022-08-19 23:13:27 +02:00
José Rebelo
106ec98f1c Identify Play Store OpenTracks as fitness app 2022-08-08 22:36:16 +02:00
José Rebelo
f7ecb5a867 Allow DeviceService to target a specific device 2022-08-05 21:34:15 +02:00
vanous
f589487588 Adjust service for CalendarReceiver for multidevice (#2765)
Co-authored-by: vanous <vanous@noreply.codeberg.org>
Co-committed-by: vanous <vanous@noreply.codeberg.org>
2022-07-20 17:29:40 +02:00
José Rebelo
8c1c7fbe63 Add support for incoming call notification delay 2022-07-05 20:34:11 +02:00
José Rebelo
152f19575f Make calendar blacklist configurable per device 2022-07-05 19:58:21 +02:00
dakhnod
4a8523f790 multi-device-support (#2526)
this PR aims to add device for multiple connected devices at once.

A lot of stuff already works, some things need to be done:

- [x] change DeviceCommunicationService to hold multiple devices and supports
- [x] implement connect / disconnect logic
- [x] widgets, not really suited for multiple devices, so far
- [x] change the notification to show multiple devices
- [ ] change GBDeviceService#onFindDevice and similar API functions to target individual devices, not all connected.
- [x] move auto-reconnect setting to device settings
- [x] fix music event crash
- [x] work out behaviour when pressing "connect" from notification
- [ ] handle service crashes
- [ ] suit coordinator methods for multiple devices of same kind
- [x] change ACL_CONNECTED receiver to connect to devices that are not currently registered in DeviceCommunicationService
- [ ] adjust after-boot auto-connection logic
- [ ] fix hanging device support. Device says disconnected, GB says connected
- [x] firmware updater doesn't work

My attempt to make onFindDevice work was to change the arguments to ```EventHandler#onFindDevice(GBDevice device, boolean start)```.
The Problem is that this forces the device-specific implementations to also accept GBDevice as an argument.

Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org>
Co-authored-by: dakhnod <dakhnod@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2526
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
2022-06-14 18:05:41 +02:00
José Rebelo
b07cd54468 Mi Band 5: Send GPS location to band during workout 2022-06-09 10:32:26 +02:00
José Rebelo
a5a653dc34 Move OpenTracks external events to dedicated package 2022-05-30 13:17:26 +02:00
José Rebelo
dd30e6aa8a Extract Track and TrackStatistics from OpenTracksContentObserver 2022-05-30 13:17:26 +02:00
theghostofheathledger
ed6b2e44b9 Add com.samsung.android.incallui to handleCallNotification blacklist 2022-05-17 11:55:29 +02:00
mvn23
9ca3fff101 Add support for native Do Not Disturb call/SMS functionality on Fossil watches 2022-05-16 21:59:02 +02:00
mvn23
43bcac072d Add com.asus.asusincallui to handleCallNotification blacklist 2022-05-09 17:48:34 +02:00
vanous
873ac85001 Enable Fitness App Tracking Stop in Huami actions. Add Toggle function to the Tracking 2022-05-09 17:18:06 +02:00
vanous
f44ff3ae69 AutoExporter changes for better operation and troubleshooting.
- Add more info about AutoExport into DataManagement activity
- Fix scheduleAlarm name
- Run AutoExporter in another thread
- Start AutoExporter on app startup if not running yet from AutoStartReceiver
- Save and show time of scheduled and last executed AutoExport
2022-03-06 13:03:59 +01:00
Arjan Schrijver
8d152bec22 Add explanation to OpenTracksController 2022-02-23 14:08:26 +01:00
vanous
10fc3e1fae unset OpenTracksObserver after finish 2022-02-22 18:19:28 +01:00
vanous
fdfb9f57e2 perform check before closing openTracksObserver.finish 2022-02-20 15:09:05 +01:00
vanous
020c4aacd5 add OpenTracks Nightly into whitelisted persistent notification apps 2022-02-20 15:07:50 +01:00
vanous
65cbea6713 Add HUAMI button/device action to control fitness tracking
- Fitness App Tracking Start already works, Stop is commented out for
  time being
- Catch exception in case the package name for controlled app doesn't
  exist/work
2022-02-19 16:04:48 +01:00
Arjan Schrijver
5224304b6c Read overall statistics from received OpenTracks dashboard API URIs 2022-02-17 11:00:58 +01:00
Arjan Schrijver
e188e54622 Add OpenTracksController for interactions with OpenTracks 2022-02-17 11:00:58 +01:00
mvn23
3c4799a339 Add support for native Do Not Disturb functionality on Fossil watches 2021-11-23 17:22:27 +01:00
Andreas Shimokawa
3db6e5d9ec Prevent crash when receiving broken weather data from TinyWeatherForecastGermany 2021-10-28 10:32:52 +02:00
vanous
d3d4130a95 Reworking notification management
- rename some methods to better indicate their functions.
- make the notification filter to be allow or deny list,
  solves #2256 and #336
- make app word filter to behave based on allow/deny settings.
- make Pebble notifications to honor the allow/deny settings.
- add generic "debug function" to Debug activity.
- add Message privacy mode settings, solves #2279
2021-10-10 11:49:13 +02:00
TaaviE
cd40478b3f Fixed a misspell and declared the conversion function as static 2021-06-20 14:57:22 +03:00
Arjan Schrijver
31d2563a18 Fossil Hybrid HR: Show correct notification icons (#2251)
Co-Authored-By: Arjan Schrijver <arjan5@noreply.codeberg.org>
Co-Committed-By: Arjan Schrijver <arjan5@noreply.codeberg.org>
2021-04-20 09:55:27 +02:00
vanous
b65c10907f allow fitness apps to send ongoing notification 2021-03-28 22:39:34 +02:00
Arjan Schrijver
cff4b65fb8 Fossil Hybrid HR: Sync notification dismissals to watch (#2219)
Fossil Hybrid HR: Move check for autoremove_notifications pref to NotificationListener

Fossil Hybrid: Rename logger to LOG and replace printStackTrace calls

Keep and maintain list of notifications pushed to device

Fossil Hybrid HR: Make autoremove notifications toggleable in device settings

Fossil Hybrid HR: Sync notification dismissals to watch

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2219
Co-Authored-By: Arjan Schrijver <arjan5@noreply.codeberg.org>
Co-Committed-By: Arjan Schrijver <arjan5@noreply.codeberg.org>
2021-03-08 14:29:08 +01:00
Andreas Shimokawa
5746c9aa63 Also ignore com.google.android.dialer, not only com.android.dialer where appropriate
Should fix #2209
2021-03-05 19:27:32 +01:00
t-m-w
5a9d1e23f5 Update Do Not Disturb support to allow priority notifications to break through. 2020-12-28 22:02:05 +01:00
Andreas Böhler
4fd904d33f Rebuild notification handling to work with postTime() instead of getId() 2020-11-21 22:12:19 +01:00
Andreas Böhler
4ad8eaab89 Fix removal of notifications 2020-11-21 22:12:19 +01:00
TaaviE
29431a0813 Fixed a bug with com.Slack's package name being impossible to look up 2020-10-11 19:16:31 +03:00
Andreas Shimokawa
1337644a14 Amazfit Bip S: Send sunrise and sunset on latest firmware if enabled
This still has to be enabled in Pebble settings..... :/
2020-09-30 18:16:25 +02:00
TaaviE
cbc99b49ab Caught an another exception that occurs when there's no access to the notifications 2020-08-30 17:53:50 +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
Bot
40852d3641 Fixed a bunch of misspellings and formatting 2020-08-26 14:37:40 +03:00
Andreas Shimokawa
ebc70b3fd5 TinyWeather: Patch incoming current weather with current timestamp 2020-08-20 23:07:24 +02:00
Andreas Shimokawa
c800a18a46 Prevent NPE in notification filter code
Closes #1984
2020-08-18 15:58:18 +02:00
TaaviE
b76a8267b8 Added CompanionDeviceManager support, added target 29 support, refactored the scan display and UI. 2020-08-02 21:07:14 +03:00
TaaviE
1c2cd99efd Made sure to request the permission to change ringer mode to silent 2020-07-27 21:21:19 +03:00
Andreas Shimokawa
7980d928a8 Add experimental support for TinyWeatherForecastGermany 2020-07-05 21:54:10 +02:00
Dmitry Markin
a8638a52fa Stop an incoming call notification when a VoIP call is missed 2020-06-20 11:52:49 +03:00
Andreas Shimokawa
0115575317 Ignore com.android.incallui when handling voip call notifications
Hopefully helps with #1881
2020-06-06 23:34:26 +02:00
Zhong Jianxin
6335b4c86a Debounce onSetMusicInfo/onSetMusicState calls
When music player switchs a song, multiple notifications(around 5 in my
test) are sent to NotificationListner, during this,
MediaControllerCompat does not always get the music info we need, the
music info and state seem randomly combined previous song and current
one.

To avoid unnecessary music info updates, debounce
onSetMusicInfo/onSetMusicState calls, so only the last music info and
state are sent to the device.
2020-05-19 23:23:45 +08:00
Andreas Shimokawa
80fb05e44a ZeTime: Fix could not synchronize calendar on connect
Fixes #1188
2020-05-05 14:11:46 +02:00
mamutcho
33b175854a Fix alarm notification 2020-03-13 20:43:41 +02:00
Dmitriy Bogdanov
7016fd25c5 NotificationListener: fix obvious lint warnings 2020-03-12 10:03:04 +01:00
Dmitriy Bogdanov
94683a863d Fix VoIP call handling during "Do Not Disturb" mode
Also honor notification blacklist for such calls.
2020-03-12 10:03:04 +01:00
Dmitriy Bogdanov
082c23b922 Minor NotificationListener refactoring
No logic changes were made, only some code reorganization.
2020-03-12 10:03:04 +01:00
Dmitry Markin
b321956c7c Stop an incoming VoIP call notification when the call is answered 2020-01-30 00:31:00 +03:00
Andreas Shimokawa
b91f357dc0 Whitelist group summary notifications for "mikado.bizcalpro"
Causes multiple notification to be sent, but this seems to be a bug from that app
2020-01-28 11:12:56 +01:00
Andreas Shimokawa
01d19e5384 VoIP calls: ignore notifications with only one action, assuming it is an outgoing call
(Might improve #1780)
2020-01-26 19:28:19 +01:00
License Bot
d6fa5d0dd5 Update license headers 2020-01-09 10:44:32 +01:00
License Bot
1dc8c26e2a Update license headers 2019-12-06 22:51:43 +01:00
dakhnod
f4a0f0ce8f Merge branch 'master' of github.com:Freeyourgadget/Gadgetbridge into fossil-q-hybrid 2019-12-04 00:48:26 +01:00
FYG_license_bot_ignore_me
8e5c4b4602 Update license headers 2019-11-23 21:53:22 +01:00
Daniel Dakhno
0fe97c687d created api specific abstraction layer 2019-10-25 19:13:55 +02:00
dakhnod
90f685c1a7 improved activity hand handling 2019-10-21 15:15:59 +02:00
dakhnod
b7277f02a6 fix notification lookup crash 2019-10-20 13:11:00 +02:00
dakhnod
2a96f762af added option to track notification count with activity hand 2019-10-20 01:42:31 +02:00
Andreas Shimokawa
4bf37ea70f Mi Band 4/Amazfit Bip Lite: Display a toast and do not try to pair if there was no auth key supplied 2019-10-12 19:44:45 +02:00
Andreas Shimokawa
4641e51715 Fix possible KitKat crash in NotificationListener
Also fix some more warnings
2019-09-17 13:37:03 +02:00
Andreas Shimokawa
8bed673a95 Annotate LineageOsWeatherReceiver as Android >=M, and only try to use it with Oreo or later 2019-08-22 21:31:08 +02:00
keeshii
a70aa5e749 Added LineageOs Weather receiver. 2019-08-22 21:28:13 +02:00
Andreas Böhler
dc22aabb1c Add support for muting an incoming call 2019-05-25 15:56:21 +02:00
Andreas Shimokawa
4638acf2d3 Add setting to enable voip call support (default off)
There were too many bugs reported, so make that optional
2019-03-17 19:02:18 +01:00
License Bot
beedb653e6 Update license headers 2019-02-13 20:43:31 +01:00
cpfeiffer
92e92ae792 Merge remote-tracking branch 'github/pr/1396' 2019-01-30 22:20:24 +01:00
Daniele Gobbetti
1832692b22 Skip duplicate notification prevention for apps that do not populate
the "when" field, like some Calendar apps.

Closes #1397
2019-01-26 16:17:51 +01:00
Daniele Gobbetti
75d3dffb14 Migrate to androidx support libraries and bump compile SDK version
"Optimize imports" has been run on all source files, there might be
unrelated changes, but these should be harmless.
2019-01-26 16:00:56 +01:00
veecue
09cb8ca0fe
added nofications for VoIP calls 2019-01-19 20:03:01 +01:00
abettenburg
86e92130d2 Updated PullRequest with recommended improvements 2019-01-12 10:00:33 +01:00
abettenburg
51399066a4 Merge remote-tracking branch 'upstream/master' into black_whitelist_for_notifications
# Conflicts:
#	app/src/main/res/values/strings.xml
2019-01-12 09:55:53 +01:00
Andreas Shimokawa
a354bdca30 try to satisfy lgtm 2018-12-18 10:26:29 +01:00
AndrewBedscastle
f90ba76fc0 No more hardcoded strings
Save and load packageName as lowercase String
Do not save empty strings as Notification Filter Entry
2018-12-06 15:11:50 +01:00
abettenburg
d6190e6e59 Apps Notification can now be configured to filter notification content based on black- and whitelists
Go to notification blacklist, allow an app if blacklisted, than configure it's behavior with the menu icon on the right hand side.
Should be pretty much self explanatory.

Database Scheme raised to 20
2018-12-03 09:48:16 +01:00
Matthieu Baerts
d60d10ddb1 notif: sanitize strings set by external apps
It seems some apps like Telegram add a lot of Unicode Control sequences
for unknown reasons. Because these strings are set by external apps, it
is safer to sanitize them. For the moment, only Unicode control
sequences are stripped.

Fixes: #1344
2018-11-26 07:33:44 +01:00