Search code examples
androidiosasp.net-mvc-4xmpphipchat

XMPP Server and Custom APIs


I have a scenario , where i need a Chat client for android and iOS and a XMPP server either setup privately or hosted. I need to call three APIs from mobile app (chat client) and from web based app.

1) Need API that can register a new user with XMPP server so in future if there is call from chat client to xmpp server, server can recognize it.(mobile app will call this api)

2) Need API that can create chat groups. (web based app will call this api)

3) Need API that can add user to chat groups and can create session for the user for particular chat group (mobile app will call this api)

Do i need to create above APIs as custom APIs in some existing XMPP server or i need to create my own xmpp server ?

Please suggest any good XMPP server which fulfill my requirement.

I am not sure how can i proceed with above requirement.

Note that i would need it in .net technology.


Solution

  • As server, you can use more or less what you want. For sure Openfire and Ejabber are largly used and supports more or less all XMPP specs.

    About API: you have 2 choices:

    1. get "best" API for each platform, so do for each platform you need it's own client (best as performance)
    2. use a javascript API and wrap a HTML + JS client in your declied-platform application.

    This is the list of API: https://xmpp.org/software/libraries.html

    it's hard to suggest something particoular due to varius linceses.

    As I know, Smack it's a very complete API and works with Android: it's not that easy to use, but Bubbler is (even if not all it's supported).

    About js: strophe.js supports chat and groupchat

    About session: it's 75% Server and 25% API. Api just require connect and login, server will store the session.

    About creation: Smack does, have to check for others API. However write this kind of function it's not that hard (XMPP require a fixed template XML, just replicate this XML). Of course it's better to have something already cooked, tested and ready but a single functionality can be developed in short time.