Open rrjanbiah opened 2 years ago
Can it be because the app is simply terminated in the background by the OS? Xiaomi are infamous for automatically stopping background apps, and stopped app can't send notifications.
It is simple to determine if Xabber is running in the background - if you see a lightbulb icon in the presence area, it is running. If you don't, then it was killed.
@andrewnenakhov Thanks a lot for your quick reply.
I can't seem to find the lightbulb in this version, but I vaguely remember in the previous versions.
However I think the app is online as my account is online for the other users.
I have a feeling that it may be due to some variations in the notification API call
XMPP servers might show you 'online' to other users even if the app is terminated and no longer maintains an active connection.
You can check if the notifications are working in a very simple way: 1) launch Xabber 2) go to home screen, see if there is an active light bulb in the notifications are (if you swipe the notification area down it should expand to a full notification saying "Xabber, 1 of 1 accounts connected" (or "Xabber (online)", if you are somehow using newer builds) 3) send yourself a message. If it will have a sound and notification, then it is working well when Xabber is running
Now, watch closely if this persistent notification disappears. If it does, then the app is killed off by OS, and there is little that can be done without relying on push notifications (we will eventually support push notifications, but servers also must support them)
See https://dontkillmyapp.com/ for more details. Xiaomi is one of the worst manufacturers according to their data.
@andrewnenakhov Thank you so much for your detailed explanation. By Monday (once we have enough people to check the behaviour), will check again and will share more details. Thanks again for your awesome support.
@andrewnenakhov I have checked the issue closely with different cases. Looks like my previous understanding is wrong. For now, I came to below findings:
And, so I googled and found couple of links:
Thanks again for your great work.
There are interesting details, but whether WhatsApp is capable of showing notifications is irrelevant - they are clearly using push notifications and that's a whole different matter.
Before we proceed any further, one thing needs to be determined exactly: DOES Xabber run in the background, or DOES IT NOT. This determines the course of solving this problem: if it DOES, then there is something wrong with the notifications on Xiaomi, or, probably, notifications settings on a phone for Xabber are somehow messed up (very possible to do in Android 8 and later), and need to be restored to a correct state, or do we need to solve the more severe problem that Xabber is simply killed in the background and can't do anything.
Does your phone display the persistent notification for Xabber like it does on screenshots below?
@andrewnenakhov Thank you so much for your awesome support.
Yes, I get something like (sorry, couldn't take a screenshot of notification as you did):
Xabber Beta
1 of 1 account online
Anyway, today I'm able to understand the exact issues! (Previously, I was goofing up as I was not sure what was wrong, as the notifications are different when compared to other apps)
Now, I figured out that I have to enable notifications settings under Settings -> Manage apps -> Xabber Beta -> Notifications
(multiple sub-options for private chat, group chat, buzz, etc. Screenshot attached below). I also enabled Autostart
as mentioned in one online forum, but not sure if that's helping anything to keep the app persistent though.
Previously, I was only looking at Xabber's native settings panel (screenshot attached below)
Now, I'm happy that my issues are sorted out. You may close this issue if you want.
From a usability point of view, I think, I never had to enable anything such for other apps. Or, probably I didn't use any other apps as frequently as Xabber. If settings cannot be grouped, may at least provide some shortcut link to this settings panel from Xabber's native settings panel.
Sorry, don't know the correct terminology...
The notification is not displaying in the lock screen. Always need to focus the application to view relevant notifications.
Version: Xabber Beta 3.0.2 Beta (824) Mobile: Redmi, Android 9