AutorÃa | Ultima modificación | Ver Log |
package com.cesams.twogetskills.sync;import android.app.Service;import android.content.Intent;import android.os.IBinder;public class SyncService extends Service {private static SyncAdapter syncAdapter = null;private static final Object lock = new Object();@Overridepublic void onCreate() {synchronized (lock) {if (syncAdapter == null) {syncAdapter = new SyncAdapter(getApplicationContext(), true);}}}@Overridepublic IBinder onBind(Intent intent) {return syncAdapter.getSyncAdapterBinder();}}