AnsweredAssumed Answered

lastActivity returning (-1) in Smack 4.1

Question asked by shanrais on May 12, 2015
Latest reply on May 13, 2015 by shanrais

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?