[TIMOB-1569] Android: Implement Image Cache
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M04 |
Components | Android |
Labels | android, feature |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T02:56:16.000+0000 |
Updated | 2011-04-17T01:56:32.000+0000 |
Description
Remote images are currently downloaded, but not cached. Add support for better background downloading and caching of images.
My prototype code for the feature is on this branch https://github.com/appcelerator/titanium_mobile/tree/dst-cachit">dst-cachit it was done in 1_4_X so it'll have to be ported to 1.5.
The goal of this support was to replace the current background download of images which doesn't know if something is already downloaded. I also wanted to provide a cleanup thread and some cache configuration parameters like max # items, max mbs, scan frequency. We should also add a clear method that could be invoked. Eventually we'll turn this into a media agnostic cache manager, but the initial need is for remote images. Especially wrt to TableViews use of them.
The remote image test in KS (Base UI - Views - Image Views - Remote Image). Is it related to changes made for this ticket? Tested with c680f8c in 2.1 emulator. I verified that my emulator has an sdcard.
There should also be a drillbit test for remote image.
Logcat:
This also affects the "Basic" image view test, since it uses a remote url. And the Facebook login test. (Probably other tests too...)
(from [116948f0cb8a79ceff779c6f8955420d5aab547f]) [#1569] TiResponseCache.get() should return null when cache doesn't contain item. If cachedir doesn't exist, create it. https://github.com/appcelerator/titanium_mobile/commit/116948f0cb8a79ceff779c6f8955420d5aab547f"> https://github.com/appcelerator/titanium_mobile/commit/116948f0cb8a...
(from [8e66e2c70caf59e50fd9b98641cc2e64acd2311f]) [#1569] Test to guard against TiResponseCache crashing https://github.com/appcelerator/titanium_mobile/commit/8e66e2c70caf59e50fd9b98641cc2e64acd2311f"> https://github.com/appcelerator/titanium_mobile/commit/8e66e2c70caf...
(from [a0f4151a5b12ab0a7ed4a77d752ff74c1aeae581]) [#1569 state:fixed-in-qa] work around android SDK bug which calls abort() even on success https://github.com/appcelerator/titanium_mobile/commit/a0f4151a5b12ab0a7ed4a77d752ff74c1aeae581"> https://github.com/appcelerator/titanium_mobile/commit/a0f4151a5b12...
closed against (1.5.0.7d08f15) ks tests used: Basic image test, remote image
this is still an issue it seems under 1.5.1
remote images loaded in a scrollableView are re-downloaded on each scroll
Michael, are your images getting scaled at all? Or are they the precise size that will be used?