Android Open Source - photo-paper Clear Cache Intent Service

From Project

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.

Java Source Code

//from w ww  . j a v a  2 s . c o m
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() {

    protected void onHandleIntent(Intent intent) {
        LoggerFactory.getLogger("ClearCacheIntentService").debug("Clearing photo database and cache");

        ActiveAndroid.getDatabase().delete("Photos", null, null);

        WallpaperApplication.getBus().post(new WallpaperChangedEvent());
        startService(new Intent(this, ApiService.class));


Java Source Code List