In case this helps anyone, I implemented a hacky solution that polls the path to each resource every few seconds to see "if it is still there". This is very lightweight, uses only a few milliseconds of cpu.
I would like to be notified when the system purges any of my ODR resources so I can update UI. (Downloaded items have an overlay to indicate that they are avaialble immediately.)
There is currently no way to be notified when ODR content is cached/purged. It is left completely up to the OS, as to which content and when that content is purged. The OS takes in several factors when deciding this content, including frequency of use, age, space availablility, and many others.
Just to add that ODR was designed to be adaptive to your application, so if your app downloads new data, depending on old data will be pushed out.
I would suggest starting here with "conditionally accessing the resources", which will check if a resource is already on the device:
- Hope that helps
Yes, of course, that's what I did, every few seconds I conditionally check every resource that "was" there to see if it is still there. This is at a point where I don't need the data, but I do indicate that it is already downloaded. I was thinking that a general Notification would be helpful since the system knows when it did something. :-)