0

I'm new to android,

I'm using a Json webservice in my app to update some database fields, but I have an issue that I can't figure out.

With this one it's working :

String url2 = "http://www.xxxxxx.com/ParserUpdateUserAction.do?test=[{\"Mail\":\"xxxxxx@hotmail.fr\",\"Nationality\":\"Spain\",\"City\":\"nimes\",\"Quote\":\"b\"}]";

JsonArrayRequest jor = new JsonArrayRequest(url2, new Response.Listener<JSONArray>().....

Not working with this :

String url2 = "http://www.xxxxxx.com/ParserUpdateUserAction.do?test=[{\"Mail\":\"xxxxxx@hotmail.fr\",\"Nationality\":\"Spain\",\"City\":\"nimes\",\"Quote\":\"bla bla bla\"}]";

JsonArrayRequest jor = new JsonArrayRequest(url2, new Response.Listener<JSONArray>().....

Could the URL parameter size be the problem ?

Thanks a lot for your help.

Alexus
  • 276
  • 1
  • 5
  • 22

1 Answers1

0

Could be a problem with the spaces - try to use %20 instead of a space

String url2 = "http://www.xxxxxx.com/ParserUpdateUserAction.do?test=[{\"Mail\":\"xxxxxx@hotmail.fr\",\"Nationality\":\"Spain\",\"City\":\"nimes\",\"Quote\":\"bla%20bla%20bla\"}]";

Edit:

There actually is a character limit on GET parameters, but it is about 512, so it shouldn't be a problem here - but you should definitly think of a better solution for longer mails

(Source: Max size of URL parameters in _GET)

Community
  • 1
  • 1
Michael Spiss
  • 1,249
  • 1
  • 10
  • 7
  • yes its working with %20 instead of spaces. I had spaces in one of my fields, the lenght wasn't the problem. Thanks a lot four ur help ThatDude ! – Alexus Jul 08 '15 at 14:40