printStackTrace(); } connection.login("user", "password"); Chat messages are one of the principal uses of the Jabber protocol, and the Smack API provides some .