Using Volley (Android) With External HttpClient (4.2.x)
Posted / Публикувана 2013-05-26 in category / в категория: Android
|
Warning: count(): Parameter must be an array or an object that implements Countable in /home/bolyarco/www-ikratko/ogrelab/wp-content/plugins/microkids-related-posts/microkids-related-posts.php on line 645
By default Volley uses the built-in AndroidHttpClient
on systems that are < Gingerbread and HttpUrlConnection
on newer. For some this may not be enough. Someone may need Cookies support, other may need to work self-signed SSL certificate. Probably there are few more reasons to use external HttpClient
but most prominent one is that you may have old code that relies on it.
About 2 years ago I wrote Using newer version of HttpClient on Android (like 4.1.x). Now as follow up I added an example how to use Volley with such external HttpClient
in my Android Volley Examples project.
Basically all I had to do is to create a new class ExtHttpClientStack
, copy the functionality from the HttpClientStack
and redirect all method calls from the built-in HttpClient
to the external one.
|