Some test code
This commit is contained in:
parent
6c373b51e5
commit
2223c40c93
@ -124,20 +124,24 @@ public class MultiSmsSender extends Activity {
|
|||||||
if (!allreadySend.contains(newN)) {
|
if (!allreadySend.contains(newN)) {
|
||||||
allreadySend.add(newN);
|
allreadySend.add(newN);
|
||||||
|
|
||||||
|
ArrayList<PendingIntent> deliveryIntents = new ArrayList<PendingIntent>(messageCount);
|
||||||
ArrayList<PendingIntent> sentIntents = null;
|
ArrayList<PendingIntent> sentIntents = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (haveDeliveryReports) {
|
if (haveDeliveryReports) {
|
||||||
|
|
||||||
sentIntents = new ArrayList<PendingIntent>(messageCount);
|
|
||||||
long entryId = mDbHelper.createEntry(mDbHelper.nameFromNumber(newN), newN, deliveryId);
|
long entryId = mDbHelper.createEntry(mDbHelper.nameFromNumber(newN), newN, deliveryId);
|
||||||
|
|
||||||
for (int j = 0; j < messageCount; j++) {
|
for (int j = 0; j < messageCount; j++) {
|
||||||
|
|
||||||
Intent intent = new Intent(MessageReceiver.MESSAGE_RECEIVED, null, this, MessageReceiver.class);
|
Intent intent = new Intent(MessageReceiver.MESSAGE_RECEIVED, null, this, MessageReceiver.class);
|
||||||
intent.putExtra(PARAM_ENTRY_ID, entryId);
|
intent.putExtra(PARAM_ENTRY_ID, entryId);
|
||||||
sentIntents.add(PendingIntent.getBroadcast(
|
deliveryIntents.add(PendingIntent.getBroadcast(
|
||||||
this, 0, intent , PendingIntent.FLAG_CANCEL_CURRENT));
|
this, 0, intent , PendingIntent.FLAG_UPDATE_CURRENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
manager.sendMultipartTextMessage(newN, null, messages, null, sentIntents);
|
manager.sendMultipartTextMessage(newN, null, messages, deliveryIntents, sentIntents);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user