jSnow264
jSnow264

Reputation: 51

Does sending texts quickly using SmsManager cause receive delays?

I'm developing an application that sends some information via text to several different phone numbers. I am using SmsManager to do this.

For testing, I am sending around 5-15 text messages to my own phone number with a for-loop. I noticed that after running the application a few times, there was a delay in receiving some of the text messages until several minutes later.

Could this be related to the fact that I'm using only my own phone number? Would I expect this to happen if I was sending it to 5-15 different phone numbers? I came up with the solution of just having a short delay between sending the messages (5 seconds), but there seems to sometimes still be a slight delay.

Is there something hidden within SmsManager, Android, or my service provider that causes a delay if you are receiving an abnormal amount of texts quickly?

Upvotes: 0

Views: 222

Answers (1)

Josh Kitchens
Josh Kitchens

Reputation: 1110

SMS has no guaranteed delivery time. At all. In fact, there's no guarantee the message will EVER be delivered. It's akin to udp: fire and forget. SMS messages basically piggyback on existing signals that your phone already uses to talk to the carrier network (not on a data channel). Because of that, devices can sometimes take several seconds/even minutes to sometimes send an SMS, and if/when it gets delivered is completely dependent on your carriers network, the receivers carrier network, the receivers phone state, etc.

TL:DR; never assume SMS will be fast, delivered, or reliable. It is, by design, none of those things. It's more of a "just so happens that most of the time the happy path is generally decently fast" sort of thing.

Upvotes: 0

Related Questions