Android code for calling web service giving “application stopped unexpectedly” error?

You are calling the web service in the UI thread which means that the UI thread is blocked till you get the response from the web service. Since Android is a mobile OS, it terminates blocked threads to improve performance.

You are calling the web service in the UI thread, which means that the UI thread is blocked till you get the response from the web service. Since Android is a mobile OS, it terminates blocked threads to improve performance. Try writing the web service call in an Async Task.

Using an Async task you can run the web service call in a background thread and your UI thread wouldn't be blocked. That should solve your problem.

Thanks a lot! Any change I could do to my code so that it becomes an ASync Task..or should I write a completely new application? – Parth Doshi Aug 1 at 10:34 you should write new app.

See this example stackoverflow. Com/questions/6693850/… – Raghav Aug 1 at 10:39 @Raghu : That means the entire call method I have used will go inside an ASync task rite? – Parth Doshi Aug 1 at 10:43 No you don't have to create a new application, just put your web service call in the AsyncTask.

Check out the Developer Docs, if you don't get it, maybe I'll post an example. But first go through the docs, it is fairly easy. – Aki Aug 1 at 10:45 Also what about the code that I m using to separate values from delimiter and display as checkbox items(see code before call() ) – Parth Doshi Aug 1 at 10:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions