SchemeRegistry supportedSchemes = new SchemeRegistry();
supportedSchemes.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
This statement work well in java but badly in android? I had add httpclient_4.1.3.jar in my referenced dependencies and android dependencies.
There is no such constructor for Scheme, as you can see here There is a similar one you can use though. Here is an example from the linked Javadoc page:
Or to adapt your code to this: