I am building a String with StringBuilder
StringBuilder builder = new StringBuilder();
builder.append("my parameters");
builder.append("other parameters");
Then i build a Url
Url url = new Url(builder.toString());
And then i try the connection
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
But the url seems not to be right from the results i get. It's like some parameter is being false passed. That's why i think the problem is in the part of the StringBuilder.
The problem is in a double parameter i try to pass.
double longitude = 23.433114;
String lng = String.ValueOf(longitude);
And then i put it in the url. But if i give it as a string the result is correct.
String lng = "23.433114"
Is UrlEncoding necessary? I will try what is suggested below.