Back to project page photo-paper.
The source code is released under:
MIT License
If you think the Android project photo-paper listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lukekorth.android_500px.services; //from w ww . j a v a 2 s . c o m import android.app.IntentService; import android.content.Intent; import com.activeandroid.ActiveAndroid; import com.lukekorth.android_500px.WallpaperApplication; import com.lukekorth.android_500px.models.WallpaperChangedEvent; import com.squareup.picasso.PicassoTools; import org.slf4j.LoggerFactory; public class ClearCacheIntentService extends IntentService { public ClearCacheIntentService() { super("ClearCacheIntentService"); } @Override protected void onHandleIntent(Intent intent) { LoggerFactory.getLogger("ClearCacheIntentService").debug("Clearing photo database and cache"); ActiveAndroid.getDatabase().delete("Photos", null, null); PicassoTools.clearCache(WallpaperApplication.getPicasso(this)); WallpaperApplication.getBus().post(new WallpaperChangedEvent()); startService(new Intent(this, ApiService.class)); } }