Back to project page Sunshine.
The source code is released under:
MIT License
If you think the Android project Sunshine 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 net.alteridem.sunshine.sync; /* w w w . ja va2 s . com*/ import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.util.Log; public class WeatherSyncService extends Service { private static final String TAG = WeatherSyncService.class.getSimpleName(); private static final Object sSyncAdapterLock = new Object(); private static WeatherSyncAdapter sSyncAdapter = null; @Override public void onCreate() { Log.d(TAG, "onCreate - WeatherSyncService"); synchronized (sSyncAdapterLock) { if (sSyncAdapter == null) { sSyncAdapter = new WeatherSyncAdapter(getApplicationContext(), true); } } } @Override public IBinder onBind(Intent intent) { return sSyncAdapter.getSyncAdapterBinder(); } }