Hangous list is empty

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 entries = r.getEntries();

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

for (RosterEntry entry : entries) {

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

}

I believe Google has moved from xmpp for some time now and is using its own proprietary protocol for Hangouts.

Google still povides an XMPP Interface. I believe the issue is that the user is not waiting for the roster to become initialized.

have a sample ??

i use smack 3.4.1 library , my script is working, but smack 4…><"