All of today, I was trying to explore more on programming an im bot for gTalk. Most of the things work out of the box, if you are using a library for xmpp, like smack, with the exception of file transfer. I did end up spending a considerable time on trying to send a file from an im bot to a user on gTalk.
It seems that file transfer between gTalk client (the one by google) and smack does not work, even though the gTalk server supports it. This is because the gTalk client uses the jingle specification for voice streaming, video streaming, and file-sharing sessions. Google uses and promotes, libjingle, a c++ library to achieve the same.
That said, file transfer on google talk servers can still work if one uses a third party client, like spark. There are many more freely available clients that one can use.
Smack, the xmpp library from ignitedrealtime.org does seem to support jingle in some form or the other, but the same is not well documented and I could not find enough samples to make it work with google. It seems that there are some differences between google and ignited realtime’s implementation of jingle specifications as well.
I have the scaffoldings ready now, and will share them on this blog soon.




Hi,
I am facing the same problem – file transfer between smack and gtalk won’t work. Did you find any workarounds?
@Intergalactic Gattu – It works for a non gTalk client, so if you use spark and connect it to gTalk server, then you can successfully do a file transfer between the bot and the client
Hi Puneet,
Can we create an IM bot for yahoo or msn using XMPP? If not, what is the way? Awaiting ur reply. Thnx….
Hi Puneet,
Thanks for sharing the info regarding file transfer with gtalk. I am struggling with the same problem i.e trying to transfer files between a java client written using smack APi and gtalk.
You mentioned that it is possible to do the same using spark. Does it have a java api library which I can use from my program? Any working example will be of great help
Thanks,
Anumodh