WangDaYeeeeee / GeometricWeather

A Material Design Weather Application
GNU Lesser General Public License v3.0
2.43k stars 187 forks source link

Duplicate alert notfications #261

Open ray-holmium opened 3 years ago

ray-holmium commented 3 years ago

Whenever there is a special weather alert in my area, geometric weather spams duplicate notifications.

Screenshot_20210813-073520_Stealth.png

papjul commented 2 years ago

Hi, can you confirm this issue happens when using OpenWeather provider?

ray-holmium commented 2 years ago

Unfortunately I cannot as OpenWeather has never worked for my location.

papjul commented 2 years ago

I guess the issue happens with AccuWeather then?

ray-holmium commented 2 years ago

Yeah exactly

HonestAbe7 commented 2 years ago

I haven't gotten any weather alerts yet but the Severe Weather Alerts app which requires Google gives me alerts from the NWS. Is there something doing wrong? I see the NWS alert but no notifications.

papjul commented 2 years ago

Alerts are provided by the weather provider. I don't know if their source is the same as NWS, so there may be differences.

ray-holmium commented 2 years ago

Sorry to bump an old issue but I have finally managed to confirm that this issue is also present when using OpenWeather as a provider.

Screenshot_20220623-180903_Nova7.jpg

papjul commented 2 years ago

It looks like you receive a notification everytime there is a refresh. Maybe the alert changed slightly each time (duration, description, etc)?

As no one else seem to report this issue in almost a year, would you mind sharing your city or any nearby city that is affected by the same issue?

ray-holmium commented 2 years ago

It looks like you receive a notification everytime there is a refresh. Maybe the alert changed slightly each time (duration, description, etc)?

As no one else seem to report this issue in almost a year, would you mind sharing your city or any nearby city that is affected by the same issue?

You're absolutely right, this seems to be an issue with the authority that issues alerts for my region, rather than a bug with Geometric Weather.

I am located in British Columbia, Canada, and I can confirm this issue is happening for multiple cities within the province. I have also charged my old phone and set its weather location to another Canadian province to see if the issue is present there.

As far as I can tell, the wording of the alerts is identical but there may be miniscule variations that I'm not noticing.

I don't think the alerts are being sent every time weather updates as I have the refresh interval set to 30 minutes, whereas the duplicate alerts only appear every two hours or so.

I'm trying to think of potential workarounds that would be simple to implement in the Geometric Weather design. Perhaps if there were a card that showed a log of all alerts issued, and that card could be displayed as a homescreen widget so I could still keep an eye on alerts without them being intrusive notifications.

I believe issue #300 is relevant to this discussion, though not exactly the same problem.

papjul commented 2 years ago

Did you update to v3.100 or later? I believe there was a fix to the deduplication function on Sep 6th: https://github.com/WangDaYeeeeee/GeometricWeather/commit/5f52d599deab9e51b67dd57a81a155543e2c415f

ray-holmium commented 2 years ago

Yes I am using version 3.102. I believe I was already using this version when I last received duplicate alerts, but I am not 100% certain on that. Will report back here when I receive another alert to confirm.

Thanks for sticking with me on this!

bmhieserich commented 2 years ago

Can confirm I receive a notification every update. Received a notification every 30 minutes this morning during a Severe Thunderstorm Watch despite no change to the alert from the NWS. Using OpenWeather in the US.

EDIT: I am also receiving repeat alerts for the storm long after the storm watch/warning has ended.

Rongronggg9 commented 2 years ago

Did you update to v3.100 or later? I believe there was a fix to the deduplication function on Sep 6th: https://github.com/WangDaYeeeeee/GeometricWeather/commit/5f52d599deab9e51b67dd57a81a155543e2c415f

Hi there. I searched for "duplicated alerts" issues so I came here. I recently updated my app from v3.013 to v3.102. Before the update, everything was fine; after the update, I am facing exactly the same issue... Yeah, exactly, all current alerts are pushed to me every auto-refresh (sometimes an auto-refresh can cause push more than once).

icburns commented 2 years ago

I've been having this issue for a while now between Android 12/13, and app versions spanning from 3.102 to several months back. Screenshot_20220817-175250~2

In addition to receiving duplicate notifications every refresh window, if I clear the notifications, the next refresh may send multiple duplicate notifications all at once. In this instance pictured above, I received six.

Rongronggg9 commented 2 years ago

Weirder. I am not in Italy!

papjul commented 2 years ago

What does the AccuWeather website show for your city?

Rongronggg9 commented 2 years ago

What does the AccuWeather website show for your city?

Hong Kong. Though I am not in there. Anyway, still in Asia but Italy is in Europe. Geometric Weather, based on GPS, shows me in the right city.

papjul commented 2 years ago

I don't know about the Italy one, it may have been a temporary issue, but on the AccuWeather websites there are also duplicate alerts for this city: https://www.accuweather.com/en/hk/hong-kong/1123655/weather-warnings/1123655

icburns commented 2 years ago

Screenshot_20220818-103939 AccuWeather has only one alert active for me, still getting a new notification on every refresh.

Rongronggg9 commented 2 years ago

I don't know about the Italy one, it may have been a temporary issue, but on the AccuWeather websites there are also duplicate alerts for this city: accuweather.com/en/hk/hong-kong/1123655/weather-warnings/1123655

I don't think they are duplicated. You see, if someone is in Kwai Tsing, then they cannot be in Kwun Tong or so on at the same time. Thus, they should not receive duplicated alerts since each person has only one body. The reality is, that the whole of Hong Kong, is under the same alert.

Arkbird1000 commented 2 years ago

I am also experiencing this problem. I am using version 3.102 F-Droid with AccuWeather for my provider. If it helps, locations affected range from Midwestern US to US south coast.

dragnev-dev commented 2 years ago

Same issue here. Version 3.011_gplay, AccuWeather, Eastern European country. I guess getting one notification per day would be sufficient and maybe yet another one if it changes to a higher severity or some different kind of alert.

papjul commented 2 years ago

Given you all use different versions but the same provider, I believe something changed on AccuWeather side. I will let the main developer have a look at it.

nekohayo commented 1 year ago

Regardless of providers, couldn't the app do a "diff" between the notifications to see if any of the contents (vs title/metadata) changed, and if the contents themselves haven't changed, and if there already is an existing notification that the user has not yet dismissed, then just update the previous notification's metadadata (ex: time stamp / title) rather than create a new one.

That way there would be only one notification for the user to dismiss, instead of dozens, and it wouldn't create a sound alert everytime it gets updated.

etuckeriv commented 1 year ago

I am also currently seeing this behavior with Air Quality Alerts.

I am using version 3.102_fdroid with AccuWeather. Located in South US. I recently went back to stock Android 13 from GrapheneOS and this has started since then. I used Geometic Weather in GrapheneOS (I can't confirm which version, unfortunately, but I was Using AccuWeather then as well), and I didn't observe this behavior.

AccuWeather does currently have an active air quality alert for my area, and It would seem I'm also getting the notification on every refresh for as long as the alert is active.

I am testing with Open weather now based on the comments I've read here, so I'll report back whether the issue persists or not.

Quick Update: It might be worth noting that I don't see any sort of active alerts with Open Weather. If that's not something they provide or if the native API isn't calling for them, this may not be helpful in regards to an actual solution.

Let me know if you'd like any other info.

etuckeriv commented 1 year ago

Confirmed I am still seeing the behavior with Open Weather. It doesn't seem to be sending as many notifications, I haven't seen any "air quality" warnings (although I know we have been under an ozone warning within the past few days), however the warnings I am getting are still being duplicated. Here is a screenshot of some duplicate flood warnings I received this morning:

Screenshot_20230610-073414~2