Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-30 Thread Ana Rita Brito Oliveira
Something that I repared.. my onPostExecute returns when I finish my app.. it is normal??? 2012/8/30 Ana Rita Brito Oliveira oliveiranar...@gmail.com: Yes.. I made it.. I made one demoProject with this AsyncTask and it worked.. :S And I copied the code into my project 2012/8/30 Kostya

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-30 Thread Andrea Pietroni
if you're not going to support versions before Gingerbread, try switching to HttpURLConnection, see this: http://android-developers.blogspot.it/2011/09/androids-http-clients.html I'm not experienced with networking, but does HttpClient need to be closed some way? could that be the problem? --

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-30 Thread Andrea Pietroni
also, try AndroidHttpClient.newInstance() instead of a plain DefaultHttpClient (this try could be easier to do before HttpURLConection). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-30 Thread Ana Rita Brito Oliveira
I will see de documentation that you give me.. and no.. we the HttpClient dosen't have any colse method. :S 2012/8/30 Andrea Pietroni andrea.pietr...@gmail.com: if you're not going to support versions before Gingerbread, try switching to HttpURLConnection, see this:

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-30 Thread Ana Rita Brito Oliveira
the URL Connection has the same problem.. I will try this,, 2012/8/30 Andrea Pietroni andrea.pietr...@gmail.com: also, try AndroidHttpClient.newInstance() instead of a plain DefaultHttpClient (this try could be easier to do before HttpURLConection). -- You received this message because you

[android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-29 Thread anaOliveira
I have updated my code! My web Service Class public class WebService { private ArrayListSimpleObserver listeners; private static String res; public WebService() { listeners = new ArrayListSimpleObserver(); } public void addListener(SimpleObserver obs) { listeners.add(obs); } public void

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-29 Thread Larry Meadors
Have you run the app in a debugger? Does it get all the way through the doInBackground method? Does the Log.d(RESPOSTA do web service, response); line get logged? I ran into this yesterday. :-/ Larry -- You received this message because you are subscribed to the Google Groups Android

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-29 Thread Ana Rita Brito Oliveira
Yes.. I ran it on debugger.. I can access the web service on debug but the messages were only from the doInbackground() You run my code yesterday and it worked? 2012/8/29 Larry Meadors larry.mead...@gmail.com Have you run the app in a debugger? Does it get all the way through the

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-29 Thread Andrea Pietroni
Yesterday I tried running the asynctask in onCreate in an activity, to test it. I used a URL from web that I knew was available. Actually I always got UnknownHostException and I don't know why, however onPostExecute got called correctly, except the first time, when it looked like it had to wait

Re: [android-developers] Re: AsyncTask - onPostExecute is not called

2012-08-29 Thread Ana Rita Brito Oliveira
So my askTask is Ok! Calin thought maybe the problem it is timeout.. I'm trying to do debug and wait to se what happen. 2012/8/29 Andrea Pietroni andrea.pietr...@gmail.com Yesterday I tried running the asynctask in onCreate in an activity, to test it. I used a URL from web that I knew was