summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--workspace/BlaMail/bin/BlaMail.apkbin284757 -> 284880 bytes
-rw-r--r--workspace/BlaMail/bin/classes.dexbin568736 -> 568964 bytes
-rw-r--r--workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.classbin2523 -> 2523 bytes
-rw-r--r--workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.classbin1463 -> 1463 bytes
-rw-r--r--workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.classbin1320 -> 1320 bytes
-rw-r--r--workspace/BlaMail/bin/com/blatech/blamail/BlaMail.classbin3100 -> 3677 bytes
-rw-r--r--workspace/BlaMail/src/com/blatech/blamail/BlaMail.java27
7 files changed, 18 insertions, 9 deletions
diff --git a/workspace/BlaMail/bin/BlaMail.apk b/workspace/BlaMail/bin/BlaMail.apk
index 59c6232..d3cbb02 100644
--- a/workspace/BlaMail/bin/BlaMail.apk
+++ b/workspace/BlaMail/bin/BlaMail.apk
Binary files differ
diff --git a/workspace/BlaMail/bin/classes.dex b/workspace/BlaMail/bin/classes.dex
index ba1d326..9a495e5 100644
--- a/workspace/BlaMail/bin/classes.dex
+++ b/workspace/BlaMail/bin/classes.dex
Binary files differ
diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class
index 5eb5ee2..030a38d 100644
--- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class
+++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$1.class
Binary files differ
diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class
index 5098ff9..8c6a9e5 100644
--- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class
+++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$2.class
Binary files differ
diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class
index 6e3ce29..d429463 100644
--- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class
+++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail$3.class
Binary files differ
diff --git a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class
index 7c72752..0b61c6a 100644
--- a/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class
+++ b/workspace/BlaMail/bin/com/blatech/blamail/BlaMail.class
Binary files differ
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,