4
0
mirror of https://github.com/cwinfo/envayasms.git synced 2025-07-13 09:46:27 +00:00

keep backlogged outgoing messages in priority queue; allow server to set priority of outgoing messages; reschedule messages until the next time the android sending limit would not be exceeded

This commit is contained in:
Jesse Young
2011-09-28 14:46:16 -07:00
parent faffc6c568
commit 31085128eb
10 changed files with 325 additions and 66 deletions

View File

@ -197,6 +197,20 @@ public class HttpTask extends AsyncTask<String, Void, HttpResponse> {
String serverId = smsElement.getAttribute("id");
sms.setServerId(serverId.equals("") ? null : serverId);
String priorityStr = smsElement.getAttribute("priority");
if (!priorityStr.equals(""))
{
try
{
sms.setPriority(Integer.parseInt(priorityStr));
}
catch (NumberFormatException ex)
{
app.log("Invalid message priority: " + priorityStr);
}
}
StringBuilder messageBody = new StringBuilder();
NodeList childNodes = smsElement.getChildNodes();