java - Get first 200 chats with td api -


i using tdapi first 200 chats can not get, first 100 chats. here codes tried 200 chats unsuccessful.

even read documentation @ here

returns list of chats in right order, chats sorted (order, chatid) in decreasing order. example, list of chats beginning, offsetorder should equal 2^63 - 1.

tdapi.getchats getchats = new tdapi.getchats(long.max_value, 0, 200); tg.getclientinstance().send(getchats, new client.resulthandler() {     @override     public void onresult(tdapi.tlobject object) {     tdapi.chats chat = (tdapi.chats) object;     final tdapi.chat[] chats2 = chat.chats;     log.e("test", "2 " + chats2.length + "");     log.e("test", "2 " + chats2[0].title + ""); }); 

even tried this:

tdapi.getchats getchats1 = new tdapi.getchats(long.max_value, 0, 100); tg.getclientinstance().send(getchats1, new client.resulthandler() {      @override      public void onresult(tdapi.tlobject object) {      tdapi.chats chat = (tdapi.chats) object;      final tdapi.chat[] chats2 = chat.chats;      log.e("okhttp hey", "2 " + chats2.length + "");      log.e("okhttp hey", "2 " + chats2[0].title + "");       tdapi.getchats getchats2 = new tdapi.getchats(0, chats2[99].id, 100);      tg.getclientinstance().send(getchats2, new client.resulthandler() {          @override          public void onresult(tdapi.tlobject object) {          tdapi.chats chat = (tdapi.chats) object;          final tdapi.chat[] chats3 = chat.chats;          log.e("okhttp hey", "3 " + chats3.length + "");          log.e("okhttp hey", "2 " + chats3[0].title + "");     }); }); 

or :

tdapi.getchats getchats1 = new tdapi.getchats(long.max_value, 0, 100); tg.getclientinstance().send(getchats1, new client.resulthandler() {      @override      public void onresult(tdapi.tlobject object) {      tdapi.chats chat = (tdapi.chats) object;      final tdapi.chat[] chats2 = chat.chats;      log.e("okhttp hey", "2 " + chats2.length + "");      log.e("okhttp hey", "2 " + chats2[0].title + "");       tdapi.getchats getchats2 = new tdapi.getchats(long.max_value-100, 0, 100);      tg.getclientinstance().send(getchats2, new client.resulthandler() {          @override          public void onresult(tdapi.tlobject object) {          tdapi.chats chat = (tdapi.chats) object;          final tdapi.chat[] chats3 = chat.chats;          log.e("okhttp hey", "3 " + chats3.length + "");          log.e("okhttp hey", "2 " + chats3[0].title + "");     }); }); 


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -