Search in sources :

Example 1 with SyncChannelFeed

use of com.applozic.mobicomkit.sync.SyncChannelFeed in project Applozic-Android-SDK by AppLozic.

the class ChannelService method syncChannels.

public synchronized void syncChannels() {
    final MobiComUserPreference userpref = MobiComUserPreference.getInstance(context);
    SyncChannelFeed syncChannelFeed = channelClientService.getChannelFeed(userpref.getChannelSyncTime());
    if (syncChannelFeed == null) {
        return;
    }
    if (syncChannelFeed.isSuccess()) {
        processChannelList(syncChannelFeed.getResponse());
        BroadcastService.sendUpdate(context, BroadcastService.INTENT_ACTIONS.CHANNEL_SYNC.toString());
    }
    userpref.setChannelSyncTime(syncChannelFeed.getGeneratedAt());
}
Also used : MobiComUserPreference(com.applozic.mobicomkit.api.account.user.MobiComUserPreference) SyncChannelFeed(com.applozic.mobicomkit.sync.SyncChannelFeed)

Aggregations

MobiComUserPreference (com.applozic.mobicomkit.api.account.user.MobiComUserPreference)1 SyncChannelFeed (com.applozic.mobicomkit.sync.SyncChannelFeed)1