I have added this code in onCreate() but the listener is not fired. Can you please help?
I am using ChatSDK Android 4.8.18.
This listener is only called once when I enter the activity.
Disposable d = ChatSDK.events().sourceOnMain()
.filter(NetworkEvent.filterType(EventType.MessageAdded))
.filter(NetworkEvent.filterThreadEntityID(thread.getName()))
.subscribe(new Consumer<NetworkEvent>() {
@Override
public void accept(NetworkEvent networkEvent) throws Exception {
txtBadgeCount.setText(String.valueOf(thread.getUnreadMessagesCount()));
}
});
I have added this code in onCreate() but the listener is not fired. Can you please help?
I am using ChatSDK Android 4.8.18.
This listener is only called once when I enter the activity.