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

Smack 4.1 No Response Timeout

$
0
0

I am using the following code in my android app:

 

 

Thread D= new Thread(new Runnable() {   @Override   public void run() {   SmackConfiguration.setDefaultPacketReplyTimeout(10000);   XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()   .setUsernameAndPassword("admin", "password")   .setServiceName("192.168.0.200")   .setHost("192.168.0.200")   .setPort(5223).setSecurityMode(SecurityMode.ifpossible)   .build();   AbstractXMPPConnection conn2 = new XMPPTCPConnection(config);   try {  conn2.connect();  conn2.login();   Presence presence = new Presence(Presence.Type.unavailable);  presence.setStatus("Gone fishing");   // Send the packet (assume we have an XMPPConnection instance called "con").  conn2.sendStanza(presence);   } catch (SmackException | IOException | XMPPException e) {   // TODO Auto-generated catch block  e.printStackTrace();   Log.d("TAG",e.toString());   }   ChatManager chatmanager = ChatManager.getInstanceFor(conn2);   Chat newChat = chatmanager.createChat("harsh@192.168.0.200");   try {  newChat.sendMessage("Howdy!");   }   catch (NotConnectedException e) {   // TODO Auto-generated catch block  e.printStackTrace();   }   }   });  D.start();

 

 

I am using these libraries:

enter image description here

This returns this error:

 

05-14 18:07:48.030: D/TAG(19470): org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 10000ms (~10s). Used filter: No filter used or filter was 'null'.

 

I had also tried to use 4.1.1 , but it returned no classdeffoundError. If anybody could please send me a list of ALL jars that are needed for 4.1.1, it will be helpful. I am not using gradle, so I require the names of the jars.


Viewing all articles
Browse latest Browse all 4979

Trending Articles