Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

change smack api from 4.1.0 to 4.1.6 and XMPPTCPConnectionConfiguration not working

$
0
0

hi every body

i was developing a chat app using smack 4.1.0 after 2 month developing yesterday i got a minidns error , don't know really why.

there was some comment in web that suggesting to use newer version of smack for handle the problem.

 

here is by build.gradle before using newer version :

 

compile "org.igniterealtime.smack:smack-android-extensions:4.1.0"
compile "org.igniterealtime.smack:smack-tcp:4.1.0"

 

after that i downloaded the last version of smack library which is 4.1.6 (for when i'm writing this) and i added following .jar files to my libs folder :

compile files('libs/smack-core-4.1.6.jar')

compile files('libs/smack-android-extensions-4.1.6.jar')

compile files('libs/smack-tcp-4.1.6.jar')

compile files('libs/smack-resolver-minidns-4.1.6.jar')

compile files('libs/smack-im-4.1.6.jar')

compile files('libs/smack-android-4.1.6.jar')

compile files('libs/smack-bosh-4.1.6.jar')

compile files('libs/smack-debug-4.1.6.jar')

compile files('libs/smack-smack-legacy-4.1.6.jar')

 

i compiled again but application crashed. i debugged it and found the problem is in this line :

 

XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builder();

 

when i reach this line application crashes.

here is coed snippet of what i did :

 

AbstractXMPPConnectionconnection;

XMPPTCPConnectionConfiguration.Builderconfig = XMPPTCPConnectionConfiguration.builder();
config.setUsernameAndPassword(loginUser, passwordUser);
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
config.setServiceName(serverName);
config.setHost(serverAddress);
config.setPort(5222);
config.setDebuggerEnabled(true);
connection = new XMPPTCPConnection(config.build());
XMPPConnectionListener connectionListener = new XMPPConnectionListener();
connection.addConnectionListener(connectionListener);

 

any idea why this is happening??

any help would be appreciated

Best regards MA.


Viewing all articles
Browse latest Browse all 4979

Trending Articles