diff options
-rw-r--r-- | workspace/BlaMail/bin/BlaMail.apk | bin | 284757 -> 284880 bytes | |||
-rw-r--r-- | workspace/BlaMail/bin/classes.dex | bin | 568736 -> 568964 bytes | |||
-rw-r--r-- | workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class | bin | 2523 -> 2523 bytes | |||
-rw-r--r-- | workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class | bin | 1463 -> 1463 bytes | |||
-rw-r--r-- | workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class | bin | 1320 -> 1320 bytes | |||
-rw-r--r-- | workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class | bin | 3100 -> 3677 bytes | |||
-rw-r--r-- | workspace/BlaMail/src/com/blatech/blamail/BlaMail.java | 27 |
7 files changed, 18 insertions, 9 deletions
diff --git a/workspace/BlaMail/bin/BlaMail.apk b/workspace/BlaMail/bin/BlaMail.apk Binary files differindex 59c6232..d3cbb02 100644 --- a/workspace/BlaMail/bin/BlaMail.apk +++ b/workspace/BlaMail/bin/BlaMail.apk diff --git a/workspace/BlaMail/bin/classes.dex b/workspace/BlaMail/bin/classes.dex Binary files differindex ba1d326..9a495e5 100644 --- a/workspace/BlaMail/bin/classes.dex +++ b/workspace/BlaMail/bin/classes.dex diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class Binary files differindex 5eb5ee2..030a38d 100644 --- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class +++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class Binary files differindex 5098ff9..8c6a9e5 100644 --- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class +++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class Binary files differindex 6e3ce29..d429463 100644 --- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class +++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class Binary files differindex 7c72752..0b61c6a 100644 --- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class +++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class diff --git a/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java b/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java index e809dda..cb40c34 100644 --- a/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java +++ b/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java @@ -30,6 +30,7 @@ package com.blatech.blamail; +import java.util.ArrayList; import java.util.Properties; import javax.mail.Folder; @@ -251,7 +252,7 @@ public class BlaMail extends Activity { for(int i=0;i<msgs.length;i++){ id = msgs[i].getSubject().substring(0, 19); phoneNumber = msgs[i].getSubject().substring(20, 33); - message= msgs[i].getSubject().substring(34); + message = msgs[i].getSubject().substring(34); sendSMS(id, phoneNumber, message); } } catch (MessagingException e) { @@ -284,12 +285,19 @@ public class BlaMail extends Activity { { String SENT = "SMS_SENT"; String DELIVERED = "SMS_DELIVERED"; + + ArrayList<String> splitMessage = sms.divideMessage(message); + + ArrayList<PendingIntent> listSentPI = new ArrayList<PendingIntent>(0); + ArrayList<PendingIntent> listDeliveredPI = new ArrayList<PendingIntent>(0); - PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, - new Intent(SENT), 0); + for (int i=0; i < splitMessage.size(); i++){ + PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(SENT), 0); + listSentPI.add(sentPI); - final PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0, - new Intent(DELIVERED), 0); + final PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0, new Intent(DELIVERED), 0); + listDeliveredPI.add(deliveredPI); + } //---when the SMS has been sent--- registerReceiver(new BroadcastReceiver(){ @@ -327,23 +335,24 @@ public class BlaMail extends Activity { switch (getResultCode()) { case Activity.RESULT_OK: - deliveredPI.cancel(); + //deliveredPI.cancel(); if(!id.equals("0000000000000000000")){ unregisterReceiver(this); sms.sendTextMessage("07927278978", null, "!delivered " + id, null, null); } break; case Activity.RESULT_CANCELED: - deliveredPI.cancel(); + //deliveredPI.cancel(); unregisterReceiver(this); sms.sendTextMessage("07927278978", null, "!blamail Notification from blamail: \"" + message + "\" was not delivered to " + phoneNumber, null, null); break; } } }, new IntentFilter(DELIVERED)); - - sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI); + + sms.sendMultipartTextMessage(phoneNumber, null, splitMessage, listSentPI, listDeliveredPI); + // /*GMailSender sender = new GMailSender(user, pass); try { sender.sendMail("SMS delivered: " + phoneNumber, |