How can I enable and disable the last seen of the user in XMPP Android and iOS. I tried to disable LastActivityManager but it is not working.
There is also an option to setLastActivity in smack. I also set -1 in that but it is not working.
Also, I changed the presence and subscription of the user and tried all the way.
So is there any setting/configuration for last seen in XMPP or we need to manage it in the traditional API way?
As per XEP-0012 , User A can query Last Seen Time of User B, only if User A has subscribed to Presence of User B.
Presence States:
XMPP Servers (Openfire, Ejabberd) have implemented this same logic as defined by the XEP.
So in your application, you need to handle presence subscription/unsubscription for allowing/disallowing last seen between users.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.