Callbacks for SDK Sync State

Receive callbacks from Hansel SDK about the sync state.

Step 1 : Implement this interface and register the listener using setHanselSyncStateListener method of Hansel class.

import io.hansel.hanselsdk.Hansel;
import io.hansel.hanselsdk.HanselRequestType;
import io.hansel.hanselsdk.HanselSyncStateListener;

Hansel.setHanselSyncStateListener(HanselRequestType.ujm, new HanselSyncStateListener() {
      @Override
      public void onHanselSynced(boolean state) {           
        }
});
import io.hansel.hanselsdk.Hansel;
import io.hansel.hanselsdk.HanselRequestType;
import io.hansel.hanselsdk.HanselSyncStateListener;

Hansel.setHanselSyncStateListener(HanselRequestType.ujm) { state ->
      // code here
}

Did this page help you?