Java EE has ServletRequest.getParameterValues().
On non-EE platforms, URL.getQuery() simply returns a string.
What\'s the normal way to properly parse the qu
On Android, I tried using @diyism answer but I encountered the space character issue raised by @rpetrich, for example:
I fill out a form where username = "us+us"
and password = "pw pw"
causing a URL string to look like:
http://somewhere?username=us%2Bus&password=pw+pw
However, @diyism code returns "us+us"
and "pw+pw"
, i.e. it doesn't detect the space character. If the URL was rewritten with %20
the space character gets identified:
http://somewhere?username=us%2Bus&password=pw%20pw
This leads to the following fix:
Uri uri = Uri.parse(url_string.replace("+", "%20"));
uri.getQueryParameter("para1");