powered by Jive Software

How to get the LastActivity using smack library?

Hello,

I used Smack library and I tried to get the lastactivty like below.

LastActivty lastSeen = LastActivityManager.getLastActivity(ConnectionManager.getInstance().getXmppConn ection(),

Utils.createXmppUserIdByUserId(friendId));

But it gave me the follwing error

08-05 11:59:36.299: E/AndroidRuntime(14006): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zobichat.activity/com.MyChat.activity.ChatInitialActivity}: java.lang.ClassCastException: org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to org.jivesoftware.smackx.packet.LastActivity

How can I fix this? Please help.

Which version of aSmack are you using?