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:
@ -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();
|
||||
|
Reference in New Issue
Block a user