I was using the following code, when using asmack library and it was working fine
LastActivity lastActivity = LastActivityManager.getLastActivity(connection, occupantJID); int seconds = lastActivity.lastActivity;
In Smack 4.1, I am using the following code, but I am getting seconds = -1
LastActivity lastActivity = new LastActivity(occupantJID); int seconds = lastActivity.lastActivity;
Why LastActivity is not working in Smack4.1?