问题
I have seen that in the iOS sdk and the API I can get the total unread messages count, but I couldn't find a way to do the same with the Quickblox Android SDK. Is there a way to achieve this?
I need something similar to this but for Android instead of iOS:
let dialogsIDs: NSSet = NSSet(array: ["55fae39ca28f9a701d0058fb"])
QBRequest.totalUnreadMessageCountForDialogsWithIDs(dialogsIDs as! Set<String>, successBlock: { (response: QBResponse, count: UInt, dialogs: [String : AnyObject]?) -> Void in
}) { (response: QBResponse) -> Void in
}
回答1:
I opened an issue with this in the quickblox github repo and they have already included it in the next release. It is already available in the last snapshot.
回答2:
When you fetch chat dialogs there is a key inside each dialog 'unreadMessageCount' which is responsible for providing unread count.
来源:https://stackoverflow.com/questions/36569272/quickblox-android-total-unread-messages-count-request