How to make WhatsApp status feature

Iam working in a project (Chat application ) like whatsApp and i want to make user_status like the one in WhatsApp , What would be the best way to do it?
Is (Presence or VCard ) the best way to do it? if not ,what is?

If you are talking about something similar to this, there is probably nothing out of the box available yet in XMPP. You could however take a look at XEP-0277: Microblogging over XMPP which you could use to build a similar custom solution. (Mircroblogging is for example used by Movim to build a twitter-like user experience).

Microblogging uses PEP/PubSub to publish postings. Smack has support for PEP/PubSub, however it lacks support for Microblogging itself for now. It should’nt be too hard, to extend Smack for Microblogging though (Pull Requests welcome :wink: ).

1 Like

Some 2 years old Java code doing Microblogging over XMPP in combination with Smack can be found on Github here. MongooseIM client for Android is licensed under the Apache License 2.0 :slight_smile:

1 Like

First of all i want to thank you for replying, The feature i wanna do is status text just like ( I wish I had ‘Google’ in my mind and ‘Antivirus’ in my heart )
How user can set his status? , how can i get all my rooster status?
Is the status optional tag of presence stanza is the correct way ?
Or the VCard-Temp XEP ?

If you just want to have text status messages, take a look at XEP-0107: User Mood. That might be what you want. I don’t think Smack has support for that out of the box though, even though implementing it would be pretty easy.

Edit: But going with the presence’s status field would be the easiest, most compatible way to go.

1 Like

The disadvantage is, that user’s can only read their contacts’ statuses, if the contacts are online.

1 Like

Hello, When implementing user_status functionality in a chat application like WhatsApp, you have two common approaches: Presence and VCard.

  1. Presence: It’s a lightweight XMPP protocol that allows users to indicate their online or offline status. It provides basic availability information like “online,” “offline,” or “away.”
  2. VCard: This XMPP extension offers a more detailed user profile, including status, profile picture, and other relevant data. It allows for a richer user experience but involves more complexity.

The best approach depends on your specific requirements. If you need basic online/offline status, Presence is sufficient. If you want detailed profiles and customized display, VCard is a better choice. Consider the scope and desired user experience to determine the most suitable approach. If you try to modified WhatsApp to add features and some changes like yowhatsapp you will be learn to make chat application like WhatsApp. Thanks