Cannot get rid of notification badge on client icon on iPad (#60)
Closed
Artur Hefczyc opened 7 years ago

Version 2.0b2

I have the client running on iPad. I have only 2 chats on "Recent" on iPad: int@muc.tigase.org and an old chat with Daniel. Nothing new was received for a while. The client shows a red badge on the app icon with '1'. I cannot find a way to reset the badge and get rid of it. Opened both of the chats killed the app a few times, nothing helps.

Andrzej Wójcik (Tigase) commented 7 years ago

%kobit This is something which I get very often. Usually, this is a result of receiving notification for a chat which was never received on a device, ie. filtered by privacy lists. I will look into this issue but it will be hard to find a root cause in your case. It may be some notification which is still pending.

Artur Hefczyc commented 7 years ago

Is there an API to reset notifications for an app? Like to reset the badge on icon? Maybe, instead of researching all the possible border cases (or just in the meantime), we could have a simple button to reset the badge? Or, instead of a button, maybe even a better approach would be to reset notifications/badge of the app, when the app is opened (and connected to the server), or opened for at least 5 seconds?

I am just thinking of my own use-case. When I see a badge on the app, I know that something is waiting for me. So I open the app to check this out. Sometimes I see there are some spam messages not even worth opening/looking at them. But I checked the app, so I would prefer to have the badge reset until something new is received.

By the way. Not sure if this is possible (or how much work it would need). But it would be very helpful to see which chats have new messages since I last opened the app. The thing is I have many chats in the "Recent" list. When the app shows that something new was received and I open the app, it is difficult for me to find out which chat has new messages. So I have to go through all/most of them to find all new messages.

Andrzej Wójcik (Tigase) commented 7 years ago

%kobit

Artur Hefczyc wrote:

Is there an API to reset notifications for an app? Like to reset the badge on icon? Maybe, instead of researching all the possible border cases (or just in the meantime), we could have a simple button to reset the badge? Or, instead of a button, maybe even a better approach would be to reset notifications/badge of the app, when the app is opened (and connected to the server), or opened for at least 5 seconds?

It should be possible but it would dismiss all notifications even for messages which were not read, so it would more difficult to find those messages as notifications in Notification Center would be gone.

I am just thinking of my own use-case. When I see a badge on the app, I know that something is waiting for me. So I open the app to check this out. Sometimes I see there are some spam messages not even worth opening/looking at them. But I checked the app, so I would prefer to have the badge reset until something new is received.

I get your point but if I receive a notification (ie. a few) as I was away from my phone for a while I look at notifications center to see all unread messages/notifications about unread messages and I'm able to enter chats directly from the notifications center.

This way all this information would be gone.

By the way. Not sure if this is possible (or how much work it would need). But it would be very helpful to see which chats have new messages since I last opened the app. The thing is I have many chats in the "Recent" list. When the app shows that something new was received and I open the app, it is difficult for me to find out which chat has new messages. So I have to go through all/most of them to find all new messages.

If you have messages sorted by the time when the last message was received it is rather simple as you need to look at the most recent chats.

Also, all chats for which you have read messages have a check mark before message content displayed on the chat list (recent list).

It would be very difficult to add keeping track for messages received since last time application was opened.

Looking at your expected experience I have to say that it is very different from my expectations. When I enter an application I enter chats which I want to read and if I see a spam I just swipe it off the screen which closes chat and removes messages. This way my recent list is far shorter and makes it easier to find new messages within this chat list.

Artur Hefczyc commented 7 years ago

Thank you for explanation. It looks like I still have much to learn on how to use the mobile device and client. I will experiment and use your suggestions.

Artur Hefczyc commented 7 years ago

Ok, I have managed to replicate the issue. Here is how this happens:

  1. I get a notification (push?) to my iPad about new message (from spammer) - I have "notifications from uknown" to off

  2. I can press on the notification to open the chat but the chat does not show on "Recent" list

  3. I can switch between the spammer chat and Contact list but as soon as I switch to another chat I can not longer get back to the spammer chat - it is not on recent list

  4. When I leave the client app, the icon shows badge with 1 message waiting

  5. After a while the badge with '1' goes away

I hope this helps.

By the way, sometimes it seems to me I can see notifications from spammer for a brief moment on my iphone too but they disappear. So it's kind of weird.

Andrzej Wójcik (Tigase) commented 7 years ago

%kobit

Let me start by stating that I was not able to reproduce this issue in another way than receiving notification for messages which was later on not delivered to my client. In my case, it was privacy list which filtered message before it was delivered.

When "notifications from unknown" is disable, I do not receive notifications from people not in my list, so you also should not receive this notification.

I'm sure that you checked but could you confirm that "notifications from unknown" is disabled?

If so, it will be very tricky to resolve this issue as I suppose that application is killed (not running) and somehow iOS tries to handle this notification without starting Messenger. This is weird and should not happen as far as I know. However, I suppose it could be possible when your device is very low on RAM (ie. some active task takes all available memory).

Another possible cause may be the fact that notification was delivered to your device after different device already retrieved/received this message. This way, your device would get a notification about new message while the message was not available and this could lead to the notification being displayed and badge still being visible.

I will try to look into the possibility of better badge refresh so that even if this happens it will be removed ASAP, but I will need to find a proper place to do so.

Andrzej Wójcik (Tigase) commented 7 years ago

I've modified how and when the badge is refreshed, so now it should disappear after you enter this chat. New build 3 was released.

Artur Hefczyc commented 7 years ago

Thank you for update. It seems to be working ok now.

A short update on my side. You were right, I actually had enabled notifications from uknown on my ipad where the problem happened. So this is clear now.

One thing I do not fully understand though, is, the notification was received and when clicked, chat opened, but the chat was not added to the Recent. Why?

Andrzej Wójcik (Tigase) commented 7 years ago

Because chat is not created when you enter from notification but items are loaded. If you would send or receive a message then it would be created.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
5975
Version
Version 2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/siskin-im#60
Please wait...
Page is in error, reload to recover