Android Open Source - Sunshine-1-6.10-update-map-intent Sunshine Sync Service






From Project

Back to project page Sunshine-1-6.10-update-map-intent.

License

The source code is released under:

Apache License

If you think the Android project Sunshine-1-6.10-update-map-intent 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.android.sunshine.app.sync;
/*w  w w .  j a va2  s. c  o  m*/
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

public class SunshineSyncService extends Service {
    private static final Object sSyncAdapterLock = new Object();
    private static SunshineSyncAdapter sSunshineSyncAdapter = null;

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

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




Java Source Code List

com.example.android.sunshine.app.DetailActivity.java
com.example.android.sunshine.app.DetailFragment.java
com.example.android.sunshine.app.ForecastAdapter.java
com.example.android.sunshine.app.ForecastFragment.java
com.example.android.sunshine.app.MainActivity.java
com.example.android.sunshine.app.SettingsActivity.java
com.example.android.sunshine.app.Utility.java
com.example.android.sunshine.app.data.WeatherContract.java
com.example.android.sunshine.app.data.WeatherDbHelper.java
com.example.android.sunshine.app.data.WeatherProvider.java
com.example.android.sunshine.app.sync.SunshineAuthenticatorService.java
com.example.android.sunshine.app.sync.SunshineAuthenticator.java
com.example.android.sunshine.app.sync.SunshineSyncAdapter.java
com.example.android.sunshine.app.sync.SunshineSyncService.java