これを試して:
// Create the configuration for this new connection
ConnectionConfiguration config = new ConnectionConfiguration("jabber.org", 5222);
config.setCompressionEnabled(true);
config.setSASLAuthenticationEnabled(true);
Connection connection = new XMPPConnection(config);
// Connect to the server
connection.connect();
// Log into the server
connection.login("danilodeveloper", "password", "SomeResource");
// getting the Openfire contacts that danilodeveloper has
Roster roster = connection.getRoster();
// the contacts
Collection<RosterEntry> entries = roster.getEntries();
エントリ(たとえば、entrie.getUser())を使用して、Openfireの連絡先をデバイスの連絡先と比較できます。
乾杯