title: How to send SMS one at a time in Android
body: <p>My app to app send SMS has a fairly standard loop to iterate through a list of phone numbers and use SMSManager.sendMultipartTextMessage().</p>
  
  <p>A BroadcastReceiver (one per message part with a unique PendingIntent, the receiver filters on that intent) is used to record any failures.</p>
  
  <p>I cannot get the issue to re-create for me but I know some of my users are getting multiple generic failures (SmsManager.RESULT_ERROR_GENERIC_FAILURE).</p>
  
  <p>I believe that their phones are unable to handle multiple SMSs coming through at high speed.
  Even if I put a delay (not a nice solution) into my loop I think that the SMS still somehow stack up in the phone and then suddenly flood through - causing the generic failures.</p>
  
  <p>I know many others get this issue but I have seen no useful solutions other than for the very simple case (no error flows etc.).</p>
  
  <p>I thought of an infinite loop that waited until each BroadcastReceiver.onReceive() reported back (a listener effectively) but I hate the idea of an infinite loop (and trying to manage it for all error flows as well).</p>
  
  <p>Any ideas for how I could ensure that the SMS process one at a time (throttle)?</p>