How to use Android Volley for parallel calling -


i'm trying use android-volley project network operations of project.

and implementation of this , use in project.

i have activity list users , feeds. user list in activity , feeds in fragment , can't response of request in fragment , log message.

w/singleclientconnmanager﹕ invalid use of singleclientconnmanager: connection still allocated. make sure release connection before allocating one.

i think because of using type volley , have changed creation of requestqueue

log message version:

if (mrequestqueue == null) {             // need in order access cookie store             mhttpclient = new defaulthttpclient();             // create request queue             mrequestqueue = volley.newrequestqueue(this, new httpclientstack(mhttpclient));         } 

changed version:

if (mrequestqueue == null) {              mrequestqueue = volley.newrequestqueue(this);         } 

with change, cant response...

any appreciated.

queue = volley.newrequestqueue(this, new httpclientstack(client)); 

as result of this, lose 1 of volley’s greatest features, making multiple requests @ once. due fact including httpclient , have live rules , let 1 connection close before introduce one. see full explanation: http://captechconsulting.com/blog/clinton-teegarden/android-volley-library-tutorial - session cookies

try this:

if ( this.mrequestqueue == null ) {          defaulthttpclient mdefaulthttpclient = new defaulthttpclient();          final clientconnectionmanager mclientconnectionmanager = mdefaulthttpclient.getconnectionmanager();         final httpparams mhttpparams = mdefaulthttpclient.getparams();         final threadsafeclientconnmanager mthreadsafeclientconnmanager = new threadsafeclientconnmanager( mhttpparams, mclientconnectionmanager.getschemeregistry() );          mdefaulthttpclient = new defaulthttpclient( mthreadsafeclientconnmanager, mhttpparams );          final httpstack httpstack = new httpclientstack( mdefaulthttpclient );          this.mrequestqueue = volley.newrequestqueue( this.getapplicationcontext(), httpstack ); } 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -