Menu

1 / 3

Android stops your app at 30 SMS a minute. Here is how I paced bulk sending around it

DEV Community: android·Nikola Mitrovic·12 days ago
#htcji4Xn
#devtoandroid#devto#dev#phone#messages
Long article (1484 words) — no AI summary yet.
Reading 0:00
15s threshold

I run SimGate , an SMS gateway where the "infrastructure" is an Android phone on your desk. You pair the phone, call an HTTP API, and the message leaves from your own SIM and your own number.

For a long time the API sent one message per request. Then people started looping over it with lists of 300 customers, and I learned what happens when a phone is asked to behave like a short code. This post is what I found, and the design I ended up with for bulk sending.

Limit 1: Android counts your messages

AOSP ships a class called SmsUsageMonitor . It counts outgoing SMS per app over a sliding window, and the stock defaults are 30 messages per minute. Manufacturers can change the numbers.

Cross the threshold and the phone shows a system dialog asking whether the app may keep sending a large number of messages. Three things make this worse than it sounds:

Nothing goes out until someone taps the dialog.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.