Element-android: Rework sending Event management

Created on 28 May 2019  路  8Comments  路  Source: vector-im/element-android

Stop using the WorkManager, which is not appropriate

A special task may be created and have to handle:

  • message ordering (queue)
  • automatic retry max 3 times and in a limited time (message must not be sent 1 hour after user has sent it)
  • error: no network

Room list may display room with unsent event:

  • Add a specific section in the catchup screen? Display a notification (ex: "You have X unsent message(s) in Y room(s)")?
p2

Most helpful comment

I would also vote in favour of retrying in the background forever - it鈥檚 one of the most common complaints i hear about Riot from WhatsApp users.

All 8 comments

automatic retry max 3 times and in a limited time (message must not be sent 1 hour after user has sent it)
error: no network

I think this is not good. If user send text (even if network is bad) - messages must be sended. User do not must check every 60 minutes - do was RiotX sent messages success or not. User must know, that riotX will sent user's messages when network will stay up.

For example:

  1. User go in tourist route with mountain peaks.
  2. User write message "I am at lat/lon and go to XXXX" and he try was send it to his family, when he was in lowland. User is trust RiotX, that RiotX will send his message to recepiens.
  3. User go by route >60 minutes.
  4. User go by route and network connectivity become allow for 15 minutes (when he was on peak).
  5. After that user go to lowland and create camp.
  6. Now user have time to open his smartphone and see - may be there his family answer to him.
  7. But He see, that his message not sended, because he was must open smartphone regularly, manual test network connectivity and manual try send all not sended messages... :-(

I think this is very unfriendly behavior. Especially in situation when sending messages very important.

May be android have some API which unsleep subscribed APP, when network connectivity is gone to up state?
For example: https://developer.android.com/training/monitoring-device-state/connectivity-monitoring

I agree with progserega.

I'm sometimes in an area with bad internet connection and its not fun to use Riot (legacy) there.

Constantly I have to check if the message was send or not.

Whatsapp for example is more reliable in this case. The message always gets send out as soon as the connection is stable.

So I don't think the limitation to 3 tries / 1 hour is a good thing.

Also imho there should be no error when sending a message without internet connection. Riot should just wait until there is a connection and send the message then.

Thats how Conversations and Whatsapp handle this:

I understand argument about infinite retry, but I was thinking of the case where you send a message in a room with high traffic. If the message is sent after a too long delay, it may be out of date. But it's for sure less serious that an important message never sent.

By the way, I've already by powned by Whatsapp, because the little icon @heipa0 is pointing out is really small, and there is no other warning when you send message with no network coverage (or in airplane mode in my case)... Basic SMS application warn you loudly when the message cannot be sent.

We definitely have to implements a clearly visual UI when there is not network, as it is done in Riot-Android. Also we may consider having a notification which is displayed when you have unsent message (which can also be due to other reasons: unknown devices in a e2e room, etc.).

It is definitely a tricky task to solve.

Maybe I should point out one more user case:

I spend several months every year in Asia in the countryside. When people here use Whatsapp they just send all messages and put the phone away. Because the internet is very weak it can take many minutes/hours until messages get sent and received. However Whatsapp works reliable and eventually the messages get send out.
Riot on the other hand is nearly unusable in this scenario. They would have to check manually all the time if the internet is strong enough and then (re-)send the messages.

So always when I am in the countryside in Asia I have to switch back to Whatsapp and obviously I cannot recommend Riot to anyone here.

From a European point of view we are very spoiled as we mostly have a stable internet connection. But on many places in the world its different.

I hope you will find a good solution for this matter and make Riot a great messenger also for remote places. :)

I would also vote in favour of retrying in the background forever - it鈥檚 one of the most common complaints i hear about Riot from WhatsApp users.

FTR we now have banner when there is no network connectivity and also retrying to send message should last forever

Running element 1.0.11 from f-droid, I still have the problem of messages not being retried automatically. This is the major reason I can't convince a bunch of people to switch away from conversations, it's not reliable. Just today I had to manually retry messages (and multiple times).

The previous following comments seem to imply that automatic (infinite?) retry is back. Is this true? Should I open a new bug report, or what is the current situation on this?

https://github.com/vector-im/element-android/issues/1988#issuecomment-686609422
https://github.com/vector-im/element-android/issues/361#issuecomment-686610122

And sending event has been reworked

Was this page helpful?
0 / 5 - 0 ratings