koush/UrlImageViewHelper — Issue #5: cleanup method uses the wrong path to the files to be deleted
Author: oviroa
Created: 2012-02-08 01:00:47+00:00
State: open

Hi -

First of all, thanks for a very useful component. Just wanted to point out that your cleanup function does not do what it's supposed to at least on the 2 devices I used, a Nexus 1 and a Galaxy Nexus, both GSM/ATT. It looks like in the delete loop, you are using the plain file string:
File f = new File(file);
where it needs to be something like this:
File f = new File(context.getFilesDir() + "/"+file )

I needed this to work in order to create a general cache cleanup method so my app can remove cached images when the user changes accounts.

On a different note, have you thought about adding a listener that would notify when images are done loading. I tried it myself but I've been failing because of the multi-thread nature of the class.

Thanks.
Ovi