element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.36k stars 713 forks source link

Notifications not working, even though "listening for notifications" [F-Droid; Huawei P30] #7232

Open MarkWieczorek opened 2 years ago

MarkWieczorek commented 2 years ago

Steps to reproduce

I am using the most recent version of Element on an android Huawei P30 phone. Notifications work on another phone of mine fine, and I have painstakingly gone through every single notifications/battery setting that I could find. I even went through the "Troubleshoot notifications" menu item, which showed that everything was working fine.

Symptoms

I note that this issue is different that some other people, where notifications work fine only when the app is open and running in the foreground.

Outcome

Not working.

Your phone model

Huawei P30: ELE-L29

Operating system version

12.0.0

Application version and app store

1.4.36 [40104360] (F-6cada8f6)

Homeserver

matrix.org

Will you send logs?

Yes

Are you willing to provide a PR?

No

Ulrar commented 2 years ago

Also have the issue on a samsung, notifications stopped working maybe a couple of weeks ago. Opening the app manually sometimes triggers the missing notifications to appear, but interestingly they don't necessarily show in-app (the little unread counter doesn't always appear on the channel that just generated the notification)

SPiRiT369 commented 1 year ago

I have the same problem of missing notifications in Element Android, as well as 2 other people that I know. This is super frustrating 🤕 Today I found a "workaround" for it. Looks like when you minimize the app while you are in a room/DM, Element still thinks that the app is active and you're following its messages, so if a new message arrives, it either won't notify you, or will make a noisy alert but show no notification. So before you minimize the app, press Back to go to the chats list, and then the notifications will work normally. At least that's how it works in my Samsung phone. I wish someone will be able to help with this soon 🫤

Ulrar commented 1 year ago

I've found that my pihole was the issue, it was blocking the Google servers used for notifications. Might be something to look into

MarkWieczorek commented 1 year ago

Just to let everyone know: I did find a solution. It is to use UnifiedPush for push notifications. This is a NON-GOOGLE push notifications service. All you need to do is install the NTFY app that is available on F-droid.

I can't remember the steps to set this up, but I remember it being easy. I think that you only need to go into the Element settings, go to notifications, and then choose "ntfy" for notification method instead of "background synchronization".

I haven't tested this too much, but it seems to work.

Ulrar commented 1 year ago

I had never heard of that but that's very neat, just switched to it to using the self hosted NextPush. Thanks for the tip @MarkWieczorek ! Now if home assistant could support it too I'd just re-block Google's servers and call it a day, sigh

metasystem commented 1 year ago

Same here on 4 android xiaomi phones...