Skip to content

Instantly share code, notes, and snippets.

@jasonrogena
Created January 18, 2014 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonrogena/8491257 to your computer and use it in GitHub Desktop.
Save jasonrogena/8491257 to your computer and use it in GitHub Desktop.
//register a new sent and delivered intent for each of the parts
ArrayList<PendingIntent> sentPendingIntents = new ArrayList<PendingIntent>();
ArrayList<PendingIntent> deliveredPendingIntents = new ArrayList<PendingIntent>();
for(int i = 0; i<noOfParts; i++){
PendingIntent newSentPE = PendingIntent.getBroadcast(context, 0, new Intent(ACTION_SMS_SENT), 0);
sentPendingIntents.add(newSentPE);
PendingIntent newDeliveredPE = PendingIntent.getBroadcast(context, 0, new Intent(ACTION_SMS_DELIVERED), 0);
deliveredPendingIntents.add(newDeliveredPE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment