2

I am using Quickblox and trying to get all dialog messages, but the number of messages in response are limited (100 by default according to documentation).
How can I get All dialog messages from the server without a limit?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Svirin
  • 564
  • 1
  • 7
  • 20

2 Answers2

0

Not absolutely sure but per QB JS SDK, we can set the limit/filter to NULL like

var filters = null;
QB.chat.dialog.list(filters, function(err, resDialogs) { ... }

On the same line, try setting it NULL or 0 in your case like

QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();
requestBuilder.setLimit(0); <-- Here

QBChatService.getChatDialogs(null, requestBuilder, new QBEntityCallback<ArrayList<QBDialog>>() {

**Disclaimer: I have used QB JS SDK not Android but should be same for all to be consistent I believe.

Rahul
  • 76,197
  • 13
  • 71
  • 125
0

You can set pagination for it, or Quickblox says :

Limit search results to N records. Useful for pagination. Default value - 100

you can pass N no of limits,before that you have to find the total count of messages of dialog.

Mayur Shah
  • 3,344
  • 1
  • 22
  • 41