Note that there are some explanatory texts on larger screens.

plurals
  1. POStringBody doesnt get the full string
    primarykey
    data
    text
    <p>I don't understand: In android, I dont get the full string returned I entered into the stringbody. I have checked that the string is fully saved but when it passes to the stringbody it just breaks. In a desktop version of the same application, the results are sucessful. But in Android, a random part in the end of the string is lost. If i try to save the resulted string after it is lost, the string saves in the same spot. I dont use any accents or special chars. Example that from a test:</p> <p>First write:</p> <blockquote> <p>This is a test bio with a random message that i'm writting on the go. If this gets cut like i am expecting something is going to be left out. Lets see what is going to happen.</p> </blockquote> <p>One save saves this:</p> <blockquote> <p>This is a test bio with a random message that i'm writting on the go. If this gets cut like i am expecting something is going to be left out</p> </blockquote> <p>Second save:</p> <blockquote> <p>This is a test bio with a random message that i'm writting on the go. If this gets cut like i am</p> </blockquote> <p>The code is</p> <pre><code>protected void gravarPerfil() throws UnsupportedEncodingException { MultipartEntity entity = new MultipartEntity(); StringBody sAcerca = null, sLoc = null; DefaultHttpClient client = new DefaultHttpClient(); if (cookie != null) { client.getCookieStore().addCookie(cookie); } HttpPost post = new HttpPost(address + "/dinamicas/editarPerfil"); FileBody imagebin = null; if (imgfile != null) { imagebin = new FileBody(imgfile); } Log.v("msg", acerca.getText().toString()); </code></pre> <p>Here is the part where my filebody doesnt load the whole string</p> <pre><code> sAcerca = new StringBody(acerca.getText().toString()); sLoc = new StringBody(local.getText().toString()); try { entity.addPart("acerca", sAcerca); entity.addPart("localizacao", sLoc); if (imgfile != null) { entity.addPart("foto", imagebin); } post.setEntity(entity); HttpResponse response = client.execute(post); } catch (Exception e) { e.printStackTrace(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload