java - QuickBlox get presence of user which isn't in the contacts -
i'm developing android chat application using quickblox.. app : user logs in , chooses user chat with.. (not in roster).. managed users using following code :
retrieveallusersfrompage(1); private void retrieveallusersfrompage(int page){ qbpagedrequestbuilder pagedrequestbuilder = new qbpagedrequestbuilder(); pagedrequestbuilder.setpage(page); pagedrequestbuilder.setperpage(100); qbusers.getusers(pagedrequestbuilder, this); } int usernumber = 1; @override public void onsuccess(arraylist<qbuser> users, bundle params) { for(qbuser user : users){ this.users.add(user); usernumber ++; } int currentpage = params.getint(consts.curr_page); int totalentries = params.getint(consts.total_entries); if(usernumber < totalentries){ retrieveallusersfrompage(currentpage+1); } }
but wanna filter them add available(online) users.. can't find way that.. idea ?
with no roster can use next trick user.lastrequestat field
http://quickblox.com/developers/simplesample-users-android#online.5coffline_status
Comments
Post a Comment