[GH-ISSUE #120] Tasks for sending sms should appear in pending tray, before going to sent tray. #99

Closed
opened 2026-02-28 01:23:10 +03:00 by kerem · 14 comments
Owner

Originally created by @Nhorning on GitHub (Aug 28, 2013).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/120

In current functionality, tasks for sending sms appear in the sent tray as soon as they are found on the server. After this toast popups appear similar to "sms sent" for each message in the sent tray, as well as "sms delivered" if they succeed in going through, and "sms sending failed, perhaps not enough balance on phone" if they fail.

The problem with this is that it's impossible to track which sms succeeded and which failed, so one can know which ones to try to resend, drop from subscription, etc.

I think an elegant solution would be to have all tasks appear in the pending tray when they are synced from the server. Once they are successfully sent, they should appear in the sent tray. Hitting the sync button would then try to resend these tasks if they have not been deleted.

Originally created by @Nhorning on GitHub (Aug 28, 2013). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/120 In current functionality, tasks for sending sms appear in the sent tray as soon as they are found on the server. After this toast popups appear similar to "sms sent" for each message in the sent tray, as well as "sms delivered" if they succeed in going through, and "sms sending failed, perhaps not enough balance on phone" if they fail. The problem with this is that it's impossible to track which sms succeeded and which failed, so one can know which ones to try to resend, drop from subscription, etc. I think an elegant solution would be to have all tasks appear in the pending tray when they are synced from the server. Once they are successfully sent, they should appear in the sent tray. Hitting the sync button would then try to resend these tasks if they have not been deleted.
kerem 2026-02-28 01:23:10 +03:00
Author
Owner

@Nhorning commented on GitHub (Feb 14, 2014):

I will clarify here. In v2.5.1 the tasks now do not appear in either the pending tray or the sent tray. The only way to verify that a tasks was sent was in the "logs" tray. This is an improvement, in that it is now possible to verify that task were sent, and is better than the continual "toast" popups. However, I believe it would be much better if the functionality above was used, or at least an option that could be enabled.

<!-- gh-comment-id:35060613 --> @Nhorning commented on GitHub (Feb 14, 2014): I will clarify here. In v2.5.1 the tasks now do not appear in either the pending tray or the sent tray. The only way to verify that a tasks was sent was in the "logs" tray. This is an improvement, in that it is now possible to verify that task were sent, and is better than the continual "toast" popups. However, I believe it would be much better if the functionality above was used, or at least an option that could be enabled.
Author
Owner

@tstalka commented on GitHub (Apr 14, 2014):

When message is synced from the server it should be sent automatically? If sanding fails it should appear in pending tray ?

<!-- gh-comment-id:40370644 --> @tstalka commented on GitHub (Apr 14, 2014): When message is synced from the server it should be sent automatically? If sanding fails it should appear in pending tray ?
Author
Owner

@eyedol commented on GitHub (Apr 14, 2014):

@tstalka Yes.

<!-- gh-comment-id:40370858 --> @eyedol commented on GitHub (Apr 14, 2014): @tstalka Yes.
Author
Owner

@tstalka commented on GitHub (Apr 18, 2014):

Messages in pending tray doesn't have a bottom label like messages in sent tray(pending/task).
When sending fails and task appear in the pending tray it should has a label with word "task"? Should pending messages have label too ?

<!-- gh-comment-id:40805682 --> @tstalka commented on GitHub (Apr 18, 2014): Messages in pending tray doesn't have a bottom label like messages in sent tray(pending/task). When sending fails and task appear in the pending tray it should has a label with word "task"? Should pending messages have label too ?
Author
Owner

@Nhorning commented on GitHub (Apr 18, 2014):

@tstalka, eyedol and I had a talk about how "pending" will always be confused with "not sent." The idea is to rename "pending/task" to something else that indicates that one is being sent from the sim, and one is being received by the sim. These labels should be the same in both the pending and the sent tray.

<!-- gh-comment-id:40830276 --> @Nhorning commented on GitHub (Apr 18, 2014): @tstalka, eyedol and I had a talk about how "pending" will always be confused with "not sent." The idea is to rename "pending/task" to something else that indicates that one is being sent from the sim, and one is being received by the sim. These labels should be the same in both the pending and the sent tray.
Author
Owner

@eyedol commented on GitHub (Apr 19, 2014):

Yes as sms to differentiate the two properly.

<!-- gh-comment-id:40863078 --> @eyedol commented on GitHub (Apr 19, 2014): Yes as `sms` to differentiate the two properly.
Author
Owner

@tstalka commented on GitHub (Apr 23, 2014):

When we synchronizing the messages from the pending tray we don't know that task were successfully resend. We know that only in https://github.com/ushahidi/SMSSync/blob/develop/smssync/src/main/java/org/addhen/smssync/fragments/PendingMessages.java#L92 . When task is sent, it disapear from the pending tray. When resending fails BroadcastReceiver will put task there again.
Is it a good solution?

<!-- gh-comment-id:41154830 --> @tstalka commented on GitHub (Apr 23, 2014): When we synchronizing the messages from the pending tray we don't know that task were successfully resend. We know that only in https://github.com/ushahidi/SMSSync/blob/develop/smssync/src/main/java/org/addhen/smssync/fragments/PendingMessages.java#L92 . When task is sent, it disapear from the pending tray. When resending fails BroadcastReceiver will put task there again. Is it a good solution?
Author
Owner

@Nhorning commented on GitHub (Apr 23, 2014):

How about this instead:

All messages (both tasks and sms) start in the pending tray once the smsync becomes aware of them)

All messages that have had a send attempted (both to the server and phone numbers) disappear from the pending tray and appear in the sent tray.

If no confirmation of success for a sent message has been received, it is marked "unconfirmed" in the sent tray.

If the message sending fails, it is returened to the pending tray and marked "failed".

Holding down on a message in either tray gives a menu option to resend it.

<!-- gh-comment-id:41177711 --> @Nhorning commented on GitHub (Apr 23, 2014): How about this instead: All messages (both tasks and sms) start in the pending tray once the smsync becomes aware of them) All messages that have had a send attempted (both to the server and phone numbers) disappear from the pending tray and appear in the sent tray. If no confirmation of success for a sent message has been received, it is marked "unconfirmed" in the sent tray. If the message sending fails, it is returened to the pending tray and marked "failed". Holding down on a message in either tray gives a menu option to resend it.
Author
Owner

@mandric commented on GitHub (Apr 25, 2014):

FYI I have a doc outlining this and a volunteer working on it, should have a WIP branch or PR next week. https://gist.github.com/mandric/11287748 Feedback appreciated.

<!-- gh-comment-id:41396810 --> @mandric commented on GitHub (Apr 25, 2014): FYI I have a doc outlining this and a volunteer working on it, should have a WIP branch or PR next week. https://gist.github.com/mandric/11287748 Feedback appreciated.
Author
Owner

@tstalka commented on GitHub (Apr 29, 2014):

@mandric
To be sure task received from the server should be sent automatically or stored in the pending tray?
When task has been sent but Receiver wasn't triggered task should be moved to sent tray with label unconfirmed, then when Receiver result is ok the label is update to task otherwise task will be moved to the pending tray with label failed.

One thing i have noticed that the Activity.RESULT_OK is -1
so fields sent_result_code and delivery_result_code should be still initalize with value -1?

<!-- gh-comment-id:41666676 --> @tstalka commented on GitHub (Apr 29, 2014): @mandric To be sure task received from the server should be sent automatically or stored in the pending tray? When task has been sent but Receiver wasn't triggered task should be moved to sent tray with label unconfirmed, then when Receiver result is ok the label is update to task otherwise task will be moved to the pending tray with label failed. One thing i have noticed that the Activity.RESULT_OK is -1 so fields sent_result_code and delivery_result_code should be still initalize with value -1?
Author
Owner

@mandric commented on GitHub (Apr 30, 2014):

@tstalka

It makes sense to put all sent messages in the sent tray then update their labels and then only move messages to pending if they failed to send. Does that cause more problems on the implementation side?

I didn't realize Activity.RESULT_OK is -1 sorry about that. I thought it was 0. So maybe we should just initialize it to null? I defer to your judgement.

<!-- gh-comment-id:41785015 --> @mandric commented on GitHub (Apr 30, 2014): @tstalka It makes sense to put all sent messages in the sent tray then update their labels and then only move messages to pending if they failed to send. Does that cause more problems on the implementation side? I didn't realize Activity.RESULT_OK is -1 sorry about that. I thought it was 0. So maybe we should just initialize it to null? I defer to your judgement.
Author
Owner

@Nhorning commented on GitHub (Apr 30, 2014):

@mandric @tstalka

Potentially how much time is there between when a message is received from the server and a send is attempted (And it appears in the log)? If this is always instantaneous, I think tasks received from the server should start in the "sent" tray. If they are processed one at a time with a few seconds delay, I think they should start out in the "pending tray" until they are sent, at which point they would appear in the "sent" tray instead.

<!-- gh-comment-id:41786091 --> @Nhorning commented on GitHub (Apr 30, 2014): @mandric @tstalka Potentially how much time is there between when a message is received from the server and a send is attempted (And it appears in the log)? If this is always instantaneous, I think tasks received from the server should start in the "sent" tray. If they are processed one at a time with a few seconds delay, I think they should start out in the "pending tray" until they are sent, at which point they would appear in the "sent" tray instead.
Author
Owner

@mandric commented on GitHub (Apr 30, 2014):

@Nhorning they should be processed/sent right away so they will only end up in pending if they failed to send.

<!-- gh-comment-id:41786790 --> @mandric commented on GitHub (Apr 30, 2014): @Nhorning they should be processed/sent right away so they will only end up in pending if they failed to send.
Author
Owner

@KamilKalfas commented on GitHub (May 16, 2014):

@eyedol please close this since you've merged PR #161

<!-- gh-comment-id:43331921 --> @KamilKalfas commented on GitHub (May 16, 2014): @eyedol please close this since you've merged PR #161
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SMSSync#99
No description provided.