I recently followed the tutorial posted here: https://stackoverflow.com/questions/4898838/howto-implement-adwhirl-in-an-android-project In order to implement a change in advertising service to 'AdWhirl' (with Millennial Media and AdMob as sub-advertisers).
Since the开发者_如何学编程 switch my app (normally 1mb in size) can range in size due to Ad Caching by Millennial Media, it is very persistant. Is there a way to delete the cache my app creates in the onDestroy() or finish() methods?
People are complaining that the app takes up too much space if they don't clear the cache on their own. Is there a way to stop it from caching those images (can't find anything in Millennial Media sdk)?
Suggestions are welcome, thanks in advance!
It depends if Millennial Media is being a good citizen or not. If they are using the cache dir, you can use Context.getCacheDir to get the cache dir. I think you can then either iterate over the files it contains using a java recursive file delete call or delete the folder and remake it.
There is probably not a way to prevent Millennial Media from storing the cache in some other location without violating the AdWhirl terms of service.
精彩评论