What is the best approach to set openfire for disconnecting idle users and in android clients to restart connection and authentification because
ConnectionListener, PingFailedListener don't do to job. My last thought were to catch android intent for network changes but there must be an xmpp solution I guess?
public void connect() throws IOException, XMPPException, SmackException { xmpptcpConnection = new XMPPTCPConnection(XMPPTCPConnectionConfiguration.builder() .setSecurityMode(disabled) .setResource(resource) .setHost(localhost) .setServiceName(serviceName) .setPort(port) .setSendPresence(true) .setDebuggerEnabled(true) .build() ); xmpptcpConnection.setPacketReplyTimeout(10000); // Prepare listeners before inital connecting. xmpptcpConnection.addConnectionListener(this); xmpptcpConnection.connect(); // Every 10*60s = 10min. PingManager.setDefaultPingInterval(600); PingManager.getInstanceFor(xmpptcpConnection).registerPingFailedListener(this); }