diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4accbfb..e047faa 100755 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="8" + android:versionName="2.0-beta6"> diff --git a/res/layout/help.xml b/res/layout/help.xml index 0f5f75d..c32e9aa 100755 --- a/res/layout/help.xml +++ b/res/layout/help.xml @@ -11,6 +11,8 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/help" + android:textSize="16sp" + android:autoLink="web" android:textColor="#FFFFFF" android:layout_margin="5px"> diff --git a/src/org/envaya/sms/App.java b/src/org/envaya/sms/App.java index 01af089..15bcfc6 100755 --- a/src/org/envaya/sms/App.java +++ b/src/org/envaya/sms/App.java @@ -78,7 +78,9 @@ public final class App extends Application { public static final String STATUS_EXTRA_NUM_PARTS = "num_parts"; public static final int MAX_DISPLAYED_LOG = 4000; - public static final int LOG_TIMESTAMP_INTERVAL = 60000; + public static final int LOG_TIMESTAMP_INTERVAL = 60000; // ms + + public static final int HTTP_CONNECTION_TIMEOUT = 10000; // ms // Each QueuedMessage is identified within our internal Map by its Uri. // Currently QueuedMessage instances are only available within EnvayaSMS, @@ -690,8 +692,8 @@ public final class App extends Application { public HttpParams getDefaultHttpParams() { HttpParams httpParams = new BasicHttpParams(); - HttpConnectionParams.setConnectionTimeout(httpParams, 8000); - HttpConnectionParams.setSoTimeout(httpParams, 8000); + HttpConnectionParams.setConnectionTimeout(httpParams, HTTP_CONNECTION_TIMEOUT); + HttpConnectionParams.setSoTimeout(httpParams, HTTP_CONNECTION_TIMEOUT); HttpProtocolParams.setContentCharset(httpParams, "UTF-8"); return httpParams; } diff --git a/src/org/envaya/sms/receiver/SmsReceiver.java b/src/org/envaya/sms/receiver/SmsReceiver.java index 2448cfd..c9f9c98 100755 --- a/src/org/envaya/sms/receiver/SmsReceiver.java +++ b/src/org/envaya/sms/receiver/SmsReceiver.java @@ -6,14 +6,11 @@ import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.envaya.sms.App; import org.envaya.sms.IncomingMessage; import org.envaya.sms.IncomingSms; - public class SmsReceiver extends BroadcastReceiver { private App app; diff --git a/src/org/envaya/sms/task/HttpTask.java b/src/org/envaya/sms/task/HttpTask.java index 525a8f9..32681d6 100755 --- a/src/org/envaya/sms/task/HttpTask.java +++ b/src/org/envaya/sms/task/HttpTask.java @@ -20,17 +20,13 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.mime.FormBodyPart; import org.apache.http.entity.mime.MultipartEntity; import org.apache.http.entity.mime.content.StringBody; -import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; import org.envaya.sms.App; import org.envaya.sms.Base64Coder; import org.envaya.sms.OutgoingMessage; @@ -202,8 +198,15 @@ public class HttpTask extends AsyncTask { sms.setServerId(serverId.equals("") ? null : serverId); - Node firstChild = smsElement.getFirstChild(); - sms.setMessageBody(firstChild != null ? firstChild.getNodeValue(): ""); + StringBuilder messageBody = new StringBuilder(); + NodeList childNodes = smsElement.getChildNodes(); + int numChildren = childNodes.getLength(); + for (int j = 0; j < numChildren; j++) + { + messageBody.append(childNodes.item(j).getNodeValue()); + } + + sms.setMessageBody(messageBody.toString()); messages.add(sms); } diff --git a/src/org/envaya/sms/ui/Help.java b/src/org/envaya/sms/ui/Help.java index a893d5c..8ad870b 100755 --- a/src/org/envaya/sms/ui/Help.java +++ b/src/org/envaya/sms/ui/Help.java @@ -23,7 +23,7 @@ public class Help extends Activity { + "EnvayaSMS is a SMS gateway.

" + "It forwards all incoming SMS messages received by this phone to a server on the internet, " + "and also sends outgoing SMS messages from that server to other phones.

" - + "See http://sms.envaya.org/ for more information.

" + + "See sms.envaya.org for more information.

" + "The Settings screen allows you configure EnvayaSMS to work with a particular server, " + "by entering the server URL, your phone number, " + "and the password assigned to your phone on the server.

"