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 ).
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
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.
The disadvantage is, that userâs can only read their contactsâ statuses, if the contacts are online.
Hello, When implementing user_status functionality in a chat application like WhatsApp, you have two common approaches: Presence and VCard.
- 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.â
- 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