element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

No notification for new messages anymore fdroid #3197

Open paskalito opened 5 years ago

paskalito commented 5 years ago

Since ~2 months i dont get any messages anymore on riot fdroid build unless i open the app (and am connected to the inet) evendough the riot banner is there and telling syncronisation all the time. - it does not notify me about anything.

This has like always worked before and its the same problem with a freind so we cannot communicate..

paskalito commented 5 years ago

https://github.com/vector-im/riot-android/issues/3190

geromueller commented 5 years ago

hi, if you use microG, make sure the app is excluded from battery optimizations!

geek-at commented 5 years ago

I'm also having problems with notifications.

Neither my girlfriend or me get any notifications. I read all threads about this problem but there is no solution.

A few pointers:

akallabeth commented 5 years ago

Reverted to 0.8.26 which is working. Also tried miniVector which ships 0.9.1 same problem there.

Something has been seriously broken since the 0.8.28 releases :/ No playing with battery or other stuff is working.

akallabeth commented 5 years ago

Btw, any reason #3155 does not get more attention?

geek-at commented 5 years ago

@akallabeth thanks your the response.

I can't find 0.8.26 (or any 0.8.x for that matter) on the docker repo and it seems they jumped versions from 0.34 to 0.99 about 6 months ago.

What's up with that

akallabeth commented 5 years ago

@chrisiaut I´m installing using f-droid directly. Have all versions there (for Riot.im, miniVector only back to 0.8.15)

akallabeth commented 5 years ago

@chrisiaut and the docker repo you reference is for synapse, the matrix server part or do I miss something?

ethoms commented 5 years ago

I'm experiencing the same issue with Android app notifications. I can't use the Google Play store version because I NEVER, EVER sign my phone into google cloud, it takes over the whole phone and is a big invasion of privacy. I have no problem with using GCM for notifications (without the message content), but signing my phone in is a big no-no for me.

So I was absolutely falling in love with Matrix/Riot until some recent testing showed that my own phone was not getting notifications when asleep / app swiped away. Then I researched it and discovered the Play store version uses GCM, which requires Google account signin.

After trying the latest version in F-droid (0.8.28a) I am unable to receive notifications at all. Upon reading this issue, I tested installing 0.8.26 (F-Droid supports installing older versions). I now get notifications when: 1.) App is out of view. 2.) Phone is in sleep mode (screen off). 3.) App is swiped close in multi-tasking (but still running in background). 4.) App is swiped close and phone is in sleep mode.

The only issue now is that the notifications take one to two minutes to come through. This is not ideal, but for me, I can live with it.

I noticed that in 0.8.26 I have a pinned notification (always running in the background). I'm sure this is a background service, Conversations (my go-to XMPP client) also does this.

My biggest concern is that I'm stuck on an older Android version on F-Droid, with no workable update path. This would be a show-stopper for me. If I can't use Riot without a Google account sign-in then I'll stick with Conversations and XMPP. But I really want to move to Matrix because there is no good iOS app for XMPP (at least not in my experience). I have no problem installing from Play store via Aurora / Yalp or similar.

For the last year or two now, Conversations has been delivering my messages / notifications flawlessly. I get them quite fast too. And with XEP-0280 (Message Carbons) and XEP-0313 (Message Archive Management) I appear to get all my message history in both directions on all devices at all times.

Please let me stay on the Matrix, Riot.im is so sweet, and the video calling is often equal to Facetime (the gold standard for video call quality in my experience).

ethoms commented 5 years ago

^ I forgot to mention: I'm running my own home server (Synapse), which I believe is setup correctly since other users are getting their notifications just fine. And I am running my own ejabberd domain for XMPP.

ethoms commented 5 years ago

OK, so most of what I said above may no longer apply. I did the same tests on my spare phone (Samsung Note 3 running LineageOS 14.1 [Android 7.1.2]). Using Riot.im version 0.9.3 from Play store the notifications seem to work well without signing in to google account. Although sometimes I get a sound, sometimes I don't (no DND configured), I always get a notitification and my LED flashes blue, so good enough I guess.

So my primary phone that has the issue I described above is a Nokia 6 running the stock ROM (currently Android 9). I beleive all existing supported Nokia phones have moved over to "Android One", so no funny business from likes of Huawei/Samsung.

I think it looks like it's an Android 9 issue, and if it effects Android One (pure Android) then we need to fix it ASAP.

paskalito commented 5 years ago

Yesterday deinstalled riot and installed 0.8.26 again. Signed in asked a friend for a test message and restarted the phone. I got a push message pretty intant (+- 1 minute) after he sent his message.

so guess the old version works for me.

Im on a Galaxy S4, LOS 14.1, Andoid 7.12

ethoms commented 5 years ago

FIXED! I'm really sorry to blame the latest version of Riot.im on Play store. It was Android 9 battery optimization after all, which if not buggy is very counter-intuitive.

So I'm used to going into "Battery Optimization" preferences in Android 7+ and setting my background apps to "Not optimized". This section in settings is still there , but it behaves differently, I noticed after a reboot my customizations (setting key apps to Not optimized) are lost / reset. I had previously turned off "Adaptive Battery" alltogether by disabling "Use Battery Manager", or I thought I had. So actually we need to go into "Background activity manager" and set Riot.im app to BOTH "Auto activate" and "Lock screen".

So, to recap, I took the following steps on Android 9:

Thanks Google, keeping me on my toes. I think I know what PIE stands for now; Pain In Elbow, coz after updates, I no longer know my arse from my elbow.

So, I can say that at my end, with exhaustive testing, the latest version of Riot.im (0.9.3) on Play store has notifications working almost flawlessy. We just need to use the appropriate battery restrictions mechanism for the version of Android in use. I say 'almost' flawless, because sometimes I get no sound with my notifications, sometimes I do. But as long as I get the blinking LED and a lock screen notification all is good here.

I'm suggesting that we close this issue. It's confusing with out of date versions of Riot. A new issue could be made instead for any ongoing. I'm an IT manager and so I test things very thoroughly, I can say notifications on Android are working well.

Useful resource that helped me: https://get.slack.help/hc/en-us/articles/360001562747-Known-issues-with-Android-notifications

akallabeth commented 5 years ago

@ethoms ok, good that it works with playstore, but this issue is specifically for the f-droid version (which still does not work)

nakic commented 5 years ago

Confirming bug using 0.9.4 from f-droid on Android 9.

ethoms commented 5 years ago

@ethoms ok, good that it works with playstore, but this issue is specifically for the f-droid version (which still does not work)

Yes, you are correct, and I apologise for suggesting we close this issue. I was getting confused between this issue and the above mentioned and related issue #2512. It was that other issue that I meant we should close, and indeed it has since been closed.

I just wanted to restate that I DO NOT actually need to use the F-Droid version as I previously thought I did. The Play Store version (which I install via Aurora) is just fine because it DOES NOT require a google account sign-in for FCM (previously named GCM) to work. I do not mind my push notifications going through Google FCM servers as long as the message content is not disclosed, which is how I understand Riots' use of FCM to work.

paskalito commented 5 years ago

Confirming bug using 0.9.4 from f-droid on Android 9.

Should have read that more closely ^^ - also tested 0.9.4 from fdroid - still not working.

Galaxy S4, LOS 14.1, Andoid 7.12

Downgrade again to 0.8.26

prurigro commented 5 years ago

0.9.4 was working well for me on Android 8, but like others using Android 9, I don't seem to get notifications once the f-droid version of Riot has been in the background for a certain amount of time. Battery optimizations have been disabled.

Would it be better to do like other apps and have a permanent notification so the server can push messages rather than periodically waking in the background and polling?

dklimpel commented 5 years ago

0.9.7 solves the problem for me.

AtjonTV commented 4 years ago

I am having the same issue on my new phone (running Android 9).

I have Riot 0.9.8, installed via Aurora Store (Google Play). Battery optimization is off and all notifications settings that allow stuff on.

In RiotX 0.7.0 notifications work though.

paskalito commented 4 years ago

0.9.7 solves the problem for me.

I can't find 0.9.7 in the F-droid store

dklimpel commented 4 years ago

Download links: https://f-droid.org/en/packages/im.vector.alpha/

0.9.8: https://f-droid.org/repo/im.vector.alpha_40090800.apk

Alexmark1 commented 4 years ago

Can confirm there are no notifications either when running Riot 0.9.9 on Android 6 x86. This applies to f-droid version as well as from Google play store. Device has working Google play store with Google account logged in. Riot notification settings are all default (fresh install). Battery optimization is disabled for Riot. I even started Riot before the test and just threw it to background pressing the Home button.

On top of that, there are no icon badges and when I open Riot, the only indication of new messages is that the sender name appears bold. Makes Riot Android unusable for me. Situation exists for more than half a year, telling by the creation date of this bug report.

rajil commented 4 years ago

Is there a way to get a persistent notification as Conversation app does?

java-py-c-cpp-js commented 4 years ago

I had a device there notifications where working (Riot 0.9.9 F-Droid). After a reboot, the notifications are working, but without any sound (still Riot 0.9.9 F-Droid). I checked every setting that eventually could change it, but no success. I restarted the app and then the smartphone: no success. Then I gave up and install RiotX from F-Droid (main repo) on the same device: now both, RiotX 0.16.0 from F-Droid and Riot 0.9.9 from F-Droid are working! After a reboot, still everything is working. Android version: 7.0

CyberMan571 commented 4 years ago

myself and my brother had the same problem! two things, I did.

  1. riot updated. web login https://riot.im/develop
  2. You can download remember Notification or Notification history from Google play. these are definitely do working and it was confirmed. which F-Droid is using ext? apk? rpm?

note:The reason for not receiving notifications is not only with about battery optimization! there are other reasons.