pankaj
pankaj

Reputation: 1356

integrating own users with xmpp chat client using Smack

I am fiddling with Smack on Android and utterly confused as to how to integrate my own database users with this XMPP client. From what I understood, XMPP has its own notion of users and groups with their login credentials. Also, they have helper objects for Chat and ChatManager.

I have my own database of users, and chat messages which I want to store at my server and device. Let us say the user has id - id1. Now:

Basically, I think I am not able to visualize the stuff happening behind the scenes at server (or how to implement it ). Can some one please explain the very basics or point to me in the right direction.

Upvotes: 0

Views: 491

Answers (1)

vitalyster
vitalyster

Reputation: 5266

  1. You need to have XMPP server application (ejabberd, prosody, openfire, tigase, etc.) to authenticate users. Most of XMPP servers are able to authenticate users against your own user database/REST API, or you can write simple plugin/script. You can write your own XMPP server too, but it may be too complex task.
  2. Smack documentation provide useful messaging examples
  3. Your REST interface may send XMPP messages too, or you may need to write additional XMPP server plugins to monitor new messages in your database, depends on your service architecture
  4. Your can extend XMPP message as you like, just keep your extended message fields in your own XML namespace. Of course, you may need to extend XMPP library both on client and server to support these new message elements.

Upvotes: 0

Related Questions