Another thing worth mentioning when you're managing your own cache is to listen for the ACTION_DEVICE_STORAGE_LOW broadcast through a <receiver>.
This way, if the device runs low on space, you can help by automatically purging your cache. j On Fri, Jul 24, 2009 at 5:27 PM, Mark Murphy<[email protected]> wrote: > > niko001 wrote: >> is it possible to force the cache of your app to clear when the user >> exits the app? >> >> My app piles up cache data (rightfully so) on each start, which is no >> longer needed once the user quits the app, so I am trying to find a >> way to forcibly clear it. > > You could try deleting the files from getCacheDir(), available on > Activity, Service, and other flavors of Context. > > On the other hand, you did not specify which cache you were concerned > about... > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ > Version 1.0 Available! > > > > -- Jeff Sharkey [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

