XMPP Connection Issue

I am implementing a chat application for which i have an Openfire Support as the backend and using Asmack version 8-0.8.9 to implement it. However i am facing an issue of Non SASL Authentication during login and i get “No Response from Server” in the message. Can you please provide me with an efficient solution for the same? In addition, i am also facing an issue that when i keep my app idle for few minutes without performing anything, my session gets removed from the openfire and i get disconnected. Why so?

This is how i am connecting to openfire and then performing login:

AndroidConnectionConfiguration connConfig = new AndroidConnectionConfiguration(HOST, PORT,SERVICE);

connConfig.setDebuggerEnabled(true);

connConfig.setReconnectionAllowed(false);

connConfig.setRosterLoadedAtLogin(true);

connConfig.setSASLAuthenticationEnabled(false);

connection.connect();

connection.login(Uname,Password);

In most of the cases this is working fine but randomly it gives me an error during login i.e. No Response from server with Non-SASL Authentication message.

Please assist.