Android Open Source - sunshineApp Sunshine Sync Service






From Project

Back to project page sunshineApp.

License

The source code is released under:

Apache License

If you think the Android project sunshineApp 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.iyedb.sunshine.sync;
/*w ww  .  jav a  2  s  .c  o  m*/
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

/**
 * Created by iyed on 31/08/2014.
 */
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.iyedb.sunshine.DetailActivity.java
com.iyedb.sunshine.DetailFragment.java
com.iyedb.sunshine.FetchWeatherTask.java
com.iyedb.sunshine.ForecastAdapter.java
com.iyedb.sunshine.ForecastFragment.java
com.iyedb.sunshine.MainActivity.java
com.iyedb.sunshine.SettingsActivity.java
com.iyedb.sunshine.Utility.java
com.iyedb.sunshine.data.WeatherContract.java
com.iyedb.sunshine.data.WeatherDbHelper.java
com.iyedb.sunshine.data.WeatherProvider.java
com.iyedb.sunshine.service.SunshineService.java
com.iyedb.sunshine.sync.SunshineAuthenticatorService.java
com.iyedb.sunshine.sync.SunshineAuthenticator.java
com.iyedb.sunshine.sync.SunshineSyncAdapter.java
com.iyedb.sunshine.sync.SunshineSyncService.java