Operfire+asmack-built Android Instant Messenger (ii) 15.4.9

Source: Internet
Author: User

The last period did not put the results chart it! Forget =-=, this is the last result map, TextView inside will display the name of the login (this is the default Administrator account =-=) Well, landed on the server we have the function of interaction can be said to be a big step forward! We're going to try to print out some data from the server (server-defined groups) let's get started. First I signed up for another three users to test also created a group (forgive my name of the boring), but also to specify the share names, and the user into the group members! Then write a Findman () function in the tool class to find the group and print Group:
1        Public Static voidFindman () {2System.out.println ("--------Find start----------");3ROSTER roster = Connect.con.getRoster ();//roster represents the list of all friends of a user and the list of users who are applying for a friend4collection<rostergroup> Entriesgroup = roster.getgroups ();//Get group Information5System.out.println ("Team:" +entriesgroup.size ()); 6               for(Rostergroup group:entriesgroup) {7collection<rosterentry> entries =group.getentries ();8System.out.println ("--------groupName--------" + "\ n" +group.getname ());//Cycle Print group names and names9                   for(Rosterentry entry:entries) {TenSystem.out.println ("Name:" +entry.getname ()); One                  } A             } -System.out.println ("--------Find End--------"); -             the             - } -  -Complete these we call this function in the child activity to print what we want!

That's what we want!

This completes the second step of our interaction with the server! , we got the server's group data!

Operfire+asmack-built Android Instant Messenger (ii) 15.4.9

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.