[GH-ISSUE #422] Messages are marked as SENT when delivery fails #298

Open
opened 2026-02-28 01:24:03 +03:00 by kerem · 0 comments
Owner

Originally created by @alxndrsn on GitHub (Apr 8, 2016).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/422

In SmsDeliveredReceiver, message delivery is checked by examining the result of BroadcastReceiver.getResultCode(): github.com/ushahidi/SMSSync@a1f2224bbb/smssync/src/main/java/org/addhen/smssync/presentation/receiver/SmsDeliveredReceiver.java (L40)

Following that, a toast and log message are triggered indicating whether the message was delivered or not.

However, in the code following, all messages have their status set to SENT. From looking at MessageModel.Status, it looks like the FAILED status would be more appropriate when the value of result is Activity.RESULT_CANCELED.

Originally created by @alxndrsn on GitHub (Apr 8, 2016). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/422 In `SmsDeliveredReceiver`, message delivery is checked by examining the result of `BroadcastReceiver.getResultCode()`: https://github.com/ushahidi/SMSSync/blob/a1f2224bbb4488a9772eb35a1d8648e0dc350a59/smssync/src/main/java/org/addhen/smssync/presentation/receiver/SmsDeliveredReceiver.java#L40 Following that, a toast and log message are triggered indicating whether the message was delivered or not. However, in the code following, all messages [have their `status` set to `SENT`](https://github.com/ushahidi/SMSSync/blob/a1f2224bbb4488a9772eb35a1d8648e0dc350a59/smssync/src/main/java/org/addhen/smssync/presentation/receiver/SmsDeliveredReceiver.java#L67). From looking at [`MessageModel.Status`](https://github.com/ushahidi/SMSSync/blob/a1f2224bbb4488a9772eb35a1d8648e0dc350a59/smssync/src/main/java/org/addhen/smssync/presentation/model/MessageModel.java#L161), it looks like the `FAILED` status would be more appropriate when the value of `result` is `Activity.RESULT_CANCELED`.
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#298
No description provided.