Android Open Source - RedditReader_Android_app Reddit Sync Service






From Project

Back to project page RedditReader_Android_app.

License

The source code is released under:

MIT License

If you think the Android project RedditReader_Android_app 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

package com.example.dawoon.redditreader.sync;
//from  w ww .j  a  v  a2  s.c  o  m
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

/**
 * Created by Dawoon on 2014-11-14.
 */
public class RedditSyncService extends Service {
    private static final Object sSyncAdapterLock = new Object();
    private static RedditSyncAdapter sRedditSyncAdapter = null;

    @Override
    public void onCreate() {
        Log.d("RedditSyncService", "onCreate - RedditSyncService");
        synchronized (sSyncAdapterLock) {
            if (sRedditSyncAdapter == null) {
                sRedditSyncAdapter = new RedditSyncAdapter(getApplicationContext(), true);
            }
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        return sRedditSyncAdapter.getSyncAdapterBinder();
    }
}




Java Source Code List

com.example.dawoon.redditreader.ApplicationTest.java
com.example.dawoon.redditreader.DetailActivity.java
com.example.dawoon.redditreader.DetailFragment.java
com.example.dawoon.redditreader.MainActivity.java
com.example.dawoon.redditreader.RedditAdapter.java
com.example.dawoon.redditreader.RedditFragment.java
com.example.dawoon.redditreader.SettingsActivity.java
com.example.dawoon.redditreader.Utility.java
com.example.dawoon.redditreader.data.RedditContract.java
com.example.dawoon.redditreader.data.RedditDbHelper.java
com.example.dawoon.redditreader.data.RedditProvider.java
com.example.dawoon.redditreader.sync.RedditAuthenticatorService.java
com.example.dawoon.redditreader.sync.RedditAuthenticator.java
com.example.dawoon.redditreader.sync.RedditSyncAdapter.java
com.example.dawoon.redditreader.sync.RedditSyncService.java