Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- username = "admin";
- password = "admin";
- port = "5222";
- serviceName = "davids-macbook-pro.local";
- host = "192.168.20.8";
- config = XMPPTCPConnectionConfiguration.builder()
- .setUsernameAndPassword(username, password)
- .setHost(host)
- .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)
- .setServiceName(serviceName)
- .setPort(Integer.parseInt(port))
- .build();
- connection = new XMPPTCPConnection(config);
- try {
- connection.connect();
- connection.login();
- } catch (SmackException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (XMPPException e) {
- e.printStackTrace();
- }
- Roster roster = Roster.getInstanceFor(connection);
- Collection<RosterEntry> entries = roster.getEntries();
- Log.i("entry", entries);
- for (RosterEntry entry : entries) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement