I am building a small app for my Android phone to forward text messages to a webserver using a very basic REST interface.
I am using the android 4.0.3 SDK. I develo
easy :
import org.apache.http.client.methods.HttpPost;
httppost.setEntity(new StringEntity(json.toString(), org.apache.http.entity.ContentType.APPLICATION_JSON));
Change this:
StringEntity se = new StringEntity(json);
se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
httppost.setEntity(se);
To this only:
httppost.setEntity(new StringEntity(json.toString(), HTTP.UTF_8));