pashapm / libs-for-android

Automatically exported from code.google.com/p/libs-for-android
Apache License 2.0
0 stars 0 forks source link

Fire callback from prefetch() method #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It is really useful to get a callback from the prefetch() method to let you 
know when it has completed successfully or encountered an error.

I patched my copy of the ImageLoader class to support this, so I've attached it 
in case you want to include this functionality in the library.

Original issue reported on code.google.com by rupert.b...@guardian.co.uk on 7 Jul 2011 at 11:06

Attachments:

GoogleCodeExporter commented 9 years ago
> It is really useful to get a callback from the prefetch() method to let you 
know when it has completed successfully or encountered an error.

What is the callback used for?

Original comment by pbald...@google.com on 7 Jul 2011 at 2:06

GoogleCodeExporter commented 9 years ago
I'm using it in an app which allows a user to download content for offline 
reading. I have a list of images to prefetch and I need to know when they are 
all downloaded, so I use the callback to work this out.

Original comment by rupert.b...@guardian.co.uk on 7 Jul 2011 at 3:17

GoogleCodeExporter commented 9 years ago
Are the images pre-fetched while the app is running in the foreground or by a 
background service?

Original comment by pbald...@google.com on 7 Jul 2011 at 3:56

GoogleCodeExporter commented 9 years ago
Currently in the foreground.

Original comment by rupert.b...@guardian.co.uk on 7 Jul 2011 at 3:58