powered by Jive Software

Ping failure when connect is isAuthenticated,

openfire version:4.4.2 smack version 4.3.4

ping failure when connect is isAuthenticated,but i can sendmessage to another client,can’t receive message…

code follow as:
PingManager.setDefaultPingInterval(10);// Ping every 10 seconds
if (null == myPingManager) {
myPingManager = PingManager.getInstanceFor(mConnection);
myPingManager.registerPingFailedListener(new PingFailedListener() {
@Override
public void pingFailed() {
System.out.println(“ping failure”);
Intent intent = new Intent(FlutterXmppConnectionService.RESPONSE_PING);
intent.setPackage(mApplicationContext.getPackageName());
intent.putExtra(FlutterXmppConnectionService.BODY, “ping failure”);
mApplicationContext.sendBroadcast(intent);
}
});
}
Boolean ping = myPingManager.pingMyServer();
if(mConnection!=null){
System.out.println(“ping server:” + myPingManager.pingMyServer() + “/” + mConnection.isAuthenticated());
}else{
Log.e(TAG, “mConnection is null!”);
}

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.