I construct a URL with the following bit of code:
String login = rootActivity.getString(R.string.url_authentication);
login = login + "user=" + mySharedPreferences.getString("username", "invalid") + "&" + "key=" + mySharedPreferences.getString("key", "invalid");
login = login.toLowerCase(Locale.US);
System.out.println("Logging in at " + login);
new HttpConnection(handler).get(login);
The URL is valid, as far as I can see visually, but the HttpConnection fails because there's an illegal character in the URL at the index of the ampersand. What really flummoxes me is, the app has between 1,000 and 5,000 installs, and we have a total of two reports of this over the past year – both from American users using Samsung devices, so I doubt it's a character encoding issue.