AsyncTask : all onProgressUpdate() done at the end of task

by Romain Guy » Sun, 07 Mar 2010 03:12:59 GMT


Sponsored Links
 Hi,

Why are you doing Looper.prepare(); in doInBackground()? Also, what
you are seeing would indeed happen if you are calling get() somewhere
on the UI thread, or otherwise blocking the UI thread after calling
execute() on your task.



>



AsyncTask : all onProgressUpdate() done at the end of task

by Nicolas H » Tue, 09 Mar 2010 23:28:03 GMT


  am doing Looper.prepare(); in doInBackground() because without that,
it seems that exceptions are not catched.
Without that, if I remember, the application simply crashes...

The last call on my UI thread is thread.execute() (during
onCreate()) , so it seems that no get() is called, even if I don't
know what this
function (get) should do.

I changed my code and instead of loading serialized objects, I build
the dictionary and create objects in the background thread.
And the progress bar is correctly filled when each Family object is
created.

For user it takes about the same time as unserialization (I have not
measured exactly), but the apk is about 850ko (due to big xml files)
contrary to 350ko with file containing serialized objects.

On 6 mar, 20:12, Romain Guy <romain...@android.com> wrote:
> >


Sponsored Links


Other Threads

1. opencore test result

Hi All ,

Here is what I got while running a test case of open core .

***************
# pvplayer_engine_test -test 1 1
SDK Labeled: PVDEV_CORE_RELEASE_6.506.4.1 built on 20090312

Test Program for pvPlayer engine class.
  Input file name 'test.mp4'
  Test case range 1 to 1
  Compressed output Video(No) Audio(No)
  Log level 8; Log node 0 Log Text 0 Log Mem 0

Starting Test 1: Open-Play-Stop-Reset
Results for Test Case 1:
  Successes 1, Failures 1
Total Execution time for file test.mp4 is : 2.712000 seconds#
***************


I want to ask why it shows 1 success and 1 failure . there should be only 1
pass or 1 fail only . Do each test case have multiple sub-tests within them
?
which class in source code finally decide whether it is pass or fail ? .

Thanks :
Uander

-- 

2. question for list view

Hi all

    I call setBackgroundResource to set background for list adapter.
it works fine.
   But the highlight will be disappear. I have to reset
setBackgroundResource (0) to show highlight .
   how to resolved this issue?
   thanks

-Sandy

-- 

3. Bug or feature?

4. How can i integrate facebook connect api in any android application?

5. BroadcastReceiver not receiving an alarm鈥檚 broadcast

6. How to connect to mysql db directly without any middleWare servers ?

7. Moving the first gallery item to left