Joaquin :: This solution represents poor design. Certainly, the coder will get a response when they call
getResponse()
but it will be
null
until the
doInBackground()
method is completed! This is bad because beginner programmers will assume they can call
getResponse()
at any time and get the result of the query. Please take a look at Raj's code example. It uses an
Interface
which will provide the callback method
processFinish()
which will be called after
doInBackground()
gets the result. —
Barns 25 secs ago