AnsweredAssumed Answered

hangous list is empty

Question asked by root on Jan 20, 2016
Latest reply on Jan 20, 2016 by root

Hi

 

use smacl 4.1.5

 

i have 2 friend in my hangouts

 

but i can't get my friend list,Roster size always empty

 

 

XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()

   .setUsernameAndPassword("xxx@gmail.com", "xxxxx")

   .setServiceName("gmail.com")

   .setHost("talk.google.com")

   .setPort(5222)

   .build();

  AbstractXMPPConnection conn2 = new XMPPTCPConnection(config);

  conn2.connect();

  conn2.login();

  Roster r = Roster.getInstanceFor(conn2).;

  Collection<RosterEntry> entries = r.getEntries();

  System.out.println(entries.size());

  for (RosterEntry entry : entries) {

       System.out.println(entry.getName());

  }

Outcomes