multiple user sign in using single XMPP connection (use gloox connected to gtalk) - xmpp

is that possible that multiple user signed in using single XMPP connection?
The purpose is to be able to host gloox on the server to push notification.

Short answer: No, it's not possible in standard XMPP.
You may want to use a xmpp-to-xmpp gateway such as Spectrum.

Related

Jabber multiple JID in one account

maybe anyone know solution.
I have multiple JID.
user#domain.com
user#domain2.com
user#domain3.com
15 JID, on public servers, and also have own jabber(prosody server)
can i split all that JID to one ?
Now i use PSI with multiple accounts, but I would like to use one and the other to forward messages to it.
And that the answer was from the account in which they wrote.
You may use xmpp-2-xmpp transport. It connects the other XMPP account(s) in your name and forwards (proxies) all messages etc.
There are two implementations that I am aware of:
J2J: http://wiki.jrudevels.org/Eng:J2J
Spectrum: http://spectrum.im (with Libpurple Jabber backend)
Unfortunately if you need to connect multiple accounts, you will need to set up multiple transport instances, as one transport instance allows only one registration per user.

Is it possible to listen/monitor messages send from a user to an another on Openfire Server using Smack API?

is it possible to listen / monitor messages send from a user to an another on Openfire Server using Smack API
No, that would be a privacy violation, because it would mean that a third party is able to intercept and read messages between two JIDs.
Of course, you can modify any XMPP server to relay certain XMPP stanzas to a third party. But since there is no XEP that defines a API for such a mechanism, it's also not available in Smack.

Sharing Jabber chat session between multiple clients

I'm using Jitsi on client side and ejabberd on server.
It seems that the chat sessions are specific to clients, i.e. if I'm logged in to the same account from 2 different clients, there will be 2 separate sessions, and one can't see what's happening in another.
Is it possible to share the sessions for the same account on all clients? Like Skype or GTalk.
If yes, is it a server configuration or client?
Thank you.
I think what you're looking for is XEP-0280 Message Carbons. Basically the server takes care of relaying the chat to all of your online resources so that you have the same chat session across all devices.
You even get chatstates from all of your other resources so you can infer whether or not you should show an unread IM notification to the user on your resource or not. You'll need client and server support for this, and it looks like ejabberd has implemented it via this module.

XMPP double message receiver Ios

I'm writing an app that use xmpp to exchange messagge between users. If I have two devices logged with the same account,any xmpp message is received only by one device, maybe the one with the fast connection? Anyway how I can do to ensure that any message will be send to any device connected with the receiver account? I'm using ejabberd server and XMPPFramework for ios.
You can login simultaneously in two different devices provided you are using different resource names when logging in. You can check sessions and resources the user has used to sign in on the server

Detecting other clients using the same account in XMPP

XMPP allows users to connect to the server from multiple clients simultaneously, using the same account. I built an application that does this but if the desktop client is enabled, I do not want the users to be able to connect using a mobile client. This is for a game and being connected to both causes problems.
So what I'm wondering is:
Is it possible to detect if there are other clients connected using the same account. If I can check for other clients, I can auto logout the user.
#Flow was on the right track. If all of your client instances use the same resource, in most servers, the later-connecting client will replace the older session. The older session will get a conflict stream error, and be disconnected. You MUST be careful not to auto-reconnect with the older client, or you will have written the "dueling resources" bug.
If you had control over your server, you have a chance at configuring it to allow a maximum of one resource for a given user, in which case the newer connection will fail with a conflict error, but you'll have worse user interface problems if you head down that path; there will be no way to get the second client logged in, even if you wanted to.
Finally, all resources for a given user are subscribed to that user's presence. As long as your client sends presence in:
<presence/>
you will receive presence from each of your other devices:
<presence to='user#example.com/resource1' from='user#example.com/resource2'/>
<presence to='user#example.com/resource1' from='user#example.com/resource3'/>
<presence to='user#example.com/resource1' from='user#example.com/resource4'/>
You could use this to decide which client is current, perhaps by adding an extension to the presence like XEP-0115.
Give the desktop and mobile client a fixed but different resource string. If the mobile client logs in, it can detect the presence of the desktop client by looking up the presence/availability of the resource of the desktop client and vice versa.
Then you only need to implement an custom XMPP ad-hoc command (XEP-0050) that tells the conflicting resource to log out.
It would be the servers responsibility: to reject a login from a client that is not accepted. I don't know if servers are able to blacklist xmpp clients but, in case you use openfire, you should be able to write an extension.