AnsweredAssumed Answered

How to connect to server on android client using smack-android-4.1.0-beta1?

Question asked by liang on Jan 20, 2015

I am studying the smack. However, I cannot connect my server using smack-android-4.1.0-beta1. I don't know what's the 'servicename'. Can someone explain it or send me a android client demo to study?

 

Builder configBuilder = XMPPTCPConnectionConfiguration.builder();
   configBuilder.setHost(SERVER);
   configBuilder.setPort(PORT);
   configBuilder.setSecurityMode(SecurityMode.disabled);
   configBuilder.setUsernameAndPassword(username, password);
   configBuilder.setResource("SomeResource");
   configBuilder.setServiceName("jabber.org");

    connection = new XMPPTCPConnection(configBuilder.build());

 

Thanks,

Outcomes