I am having getting error response with ALPHA-7 version .
Below is my code
xmppConnectionConfigurationBuilder = XMPPTCPConnectionConfiguration.builder(); | ||
xmppConnectionConfigurationBuilder.setPort(AppConfig.PORT); | ||
xmppConnectionConfigurationBuilder.setHost(AppConfig.HOST); | ||
xmppConnectionConfigurationBuilder.setUsernameAndPassword(AppSetting.getString(c ontext, PreferenceKey.JID, Util.getChatId(context).toLowerCase()),AppSetting.getString(context, PreferenceKey.PASSWORD,Util.getChatId(context).toLowerCase())); | ||
xmppConnectionConfigurationBuilder.setServiceName(AppConfig.HOST); | ||
xmppConnectionConfigurationBuilder.setDebuggerEnabled(true); | ||
xmppConnectionConfigurationBuilder.setSecurityMode(SecurityMode.disabled); | ||
xmppConnectionConfigurationBuilder.setRosterLoadedAtLogin(true); | ||
xmppConnectionConfigurationBuilder.setCallbackHandler(callbackHandler); | ||
xmppConnectionConfigurationBuilder.setSendPresence(false); | ||
xmppConnectionConfigurationBuilder.setResource(null); |
try {
TLSUtils.acceptAllCertificates(xmppConnectionConfigurationBuilder);
} catch (KeyManagementException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
if (connection == null){
connection = new XMPPTCPConnection(xmppConnectionConfigurationBuilder.build());
}
else{
connection.disconnect();
}
connection.connect();
connection.login();
XMPPTCPConnection.setUseStreamManagementDefault(true);
And i am having following response , i tried with same credential with asmack and its working by chaining some code .
- 12-08 19:18:00.839: D/SMACK(14117): RECV (0): <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mech anism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mech anism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
- 12-08 19:18:00.839: D/SMACK(14117): SENT (0): <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'>=</auth>
- 12-08 19:18:00.871: D/SMACK(14117): RECV (0): <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09Im9iMTIwLTUwIixub25jZT0iZU1Obn JYVlcwOW05cjJweDZQSmdQb045d0F1Vi8yNWxTa1VLRzdFQSIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi 04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
- 12-08 19:18:00.871: D/SMACK(14117): SENT (0): <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9ImRob25pIixyZWFsbT0iMTcyLj E2LjEyMC40NiIsbm9uY2U9ImVNTm5yWFZXMDltOXIycHg2UEpnUG9OOXdBdVYvMjVsU2tVS0c3RUEiLG Nub25jZT0icDFYNDNna3FCMXhrQTI4UzA1Q1czekN3WkdIbk9HQTEiLG5jPTAwMDAwMDAxLHFvcD1hdX RoLGRpZ2VzdC11cmk9InhtcHAvMTcyLjE2LjEyMC40NiIscmVzcG9uc2U9ZTNjNGY3NDI1ZGQ2ODVlOT c4MDZkNDkwZDQ5Yzk3NzcsY2hhcnNldD11dGYtOA==</response>
- 12-08 19:18:00.875: D/SMACK(14117): RECV (0): <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>