Reputation: 2593
I made a test project just testing http request and response behavior, There is a simple http class extending Asynctask to make request and get response. I am performing some string manipulation on http response, there is a problem my code which is using http response is executing before getting the response from class, which results null pointer exception. So to resolve this i made a thread and all code dependent on http response put in that thread. Now every thing is working fine.But i want to know is there any other technique to handle this? or my approach is good? Please suggest.
Upvotes: 0
Views: 292
Reputation: 40416
i want to know is there any other technique to handle this?
Use AsyncTask for Android Http Request.
Upvotes: 1