I updated to smack 4.1, but now cannot connect to gtalk. This is my code I am using:
XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();
configBuilder.setHost("talk.google.com");
configBuilder.setPort(5222);
configBuilder.setServiceName("gmail.com");
configBuilder.setSecurityMode(SecurityMode.required);
configBuilder.setDebuggerEnabled(true);
configBuilder.setSendPresence(true);
configBuilder.setUsernameAndPassword(pref.getString(Constants.KEY_USER, ""), pref.getString(Constants.KEY_TOKEN, ""));
SASLAuthentication.blacklistSASLMechanism(SASLMechanism.PLAIN);
AbstractXMPPConnection connection = new XMPPTCPConnection(configBuilder.build());
try
{
connection.connect();
connection.login();//.login(pref.getString(Constants.KEY_USER, ""), pref.getString(Constants.KEY_TOKEN, ""));
}
catch(Exception e)
{
e.printStackTrace();
return null;
}
This is the error i get:
D/SMACK(12807): SENT (3): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='X-OAUTH2'>REMOVED_THIS=</auth>
D/SMACK(12807): RECV (3): <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><incorrect-encoding/></failure>