-1

Is it possible to use XMPP XEP - xml request directly in an android application. Currently I am doing the XMPP chat application with aSmack library, but in some cases the library is not working as they documented. So that I am planning some other parallel way, can we use xep xml requests directly in an android xmpp chat application?

For example I want to find out the user joined rooms, I am using getJoinedRooms(Connection, User) in the aSmack instead can I use this xml request as documented in the <iq from='hag66@shakespeare.lit/pda' id='zb8q41f4' to='chat.shakespeare.lit' type='get'> <query xmlns='http://jabber.org/protocol/disco#items'/> </iq>

If it is possible how can I do that?

Jashan PJ
  • 4,177
  • 4
  • 27
  • 41
  • Other way around is using it through javascript.You can try it in webview or you can build android application through phonegap as well. – dreamcoder Aug 02 '13 at 10:58

1 Answers1

1

The aSmack library is a strange library which seems to cause everyone trying to use it problems, but... it's the only decent xmpp library there is.

When I had to work with it, I quickly replaced the closed .jar for open-source files instead. This way you get much more of a feeling what the library really does through debugging. It also makes it clear, that you do not want to try and do this own your own. The library is massive.

It's been a while, and i can't find it anywhere in my bookmarks anymore, but there was this site that kept it open-source and fixed quite some bugs etc for themselves.

-- edit : Not sure what version this is and if this was the one i used but; rtreffer/smack--

Anyway, in short my advise would be to find the last open-source version you can find of this, and actually add it as a library project or add all the files to your project, so you can actually see what is going on.

Once you've got that running, you can go all the way into it where the sockets are received and send, and the XML messages are parsed.

Like this you can fetch info out of the messages, or even create your own type of messages.

Good luck.

Stefan de Bruijn
  • 6,289
  • 2
  • 23
  • 31
  • aSmack works just fine, you just have to use an up-to-date version. See also: http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions Also you don't have to add the aSmack source, the aSmack jars also come with a source zip, that can be added your project for debugging purposes. – Flow Aug 02 '13 at 23:11
  • But not for adjusting purposes. – Stefan de Bruijn Aug 05 '13 at 06:59