![XmppTop.png](/android/forum/proxy.php?image=http%3A%2F%2Fwww.visualnet.inf.br%2Fimagens%2Fb4a%2Fxmpp%2FXmppTop.png&hash=e8d8e926d4602c9c9dde175d1a29ac1a)
XMPP/JABBER - Best protocol to Instant Messengers for B4A
This library was made based on XMPP Protocol
Installation instructions:
- Copy the .xml and .jar(s) files to your custom libraries folder
- Select in your REFERENCED LIBRARIES
![ReferenceXMPP.jpg](/android/forum/proxy.php?image=http%3A%2F%2Fwww.visualnet.inf.br%2Fimagens%2Fb4a%2Fxmpp%2FReferenceXMPP.jpg&hash=a8e75eaf567ee810cc7868f706452c59)
Version history:
V1.0.0 (First public release - Donationware):
- Initial version
V1.0.1:
- Fix bug username
V1.0.2:
- Create 4 for events (ErrorSendMessage,ErrorConnect,ErrorLogin,PresenceChanged)
- Create Methods: ChangeStatus, ActivatePresence
- Implemented correction in case the Name is Null
*Obs: PresenceChanged depends of each server.
Was observed in tests that some servers do not support the "presence listener"
V1.0.3:
- Fix bug when use XMPP and MQTT together
V1.0.4:
- Fix bug when use XMPP in some cases with threads
XMPP
Author: Alberto Iglesias - alberto@visualnet.inf.br
Version: 1.0.4
- XMPP
Events:- deliverycomplete (Message As String)
- messageArrived (Message As String)
- onConnect ()
- onDisconnect ()
- onDisconnect (Status as boolean As )
- onInitialized ()
- onLogin ()
- ErrorSendMessage(Error As String)
- ErrorConnect(Error As String)
- ErrorLogin(Error As String)
- PresenceChanged(Presence As String)
- Host As String
Name or IP of the Jabber/XMPP Server - JavaDebug As Boolean
Enable/Disable Debug from Java Code - Port As Int
Port of the Jabber/XMPP Server
- About As String
About the developer - Connect
Connect to the Jabber/XMPP Server - ChangeStatus(int iStatus)
Change the status of your client - CreateChat (userJID As String)
Create Chat with the JIB User - Disconnect
Disconnect from Jabber/XMPP Server - GetHost As String
Returns the host name of the server where the XMPP server is running - GetRoster As List
Get Roster List - GetUser As String
Get the connection current user - Initialize (eventname As String)
Initializing XMPP Object - IsConnected As Boolean
Get a connection status - IsSecureConnection As Boolean
Check if the connection is secure - Login (Username As String, Password As String)
Login into to the Jabber/XMPP Server - SendMessage (message As String)
Send a message into the chat - Version As String
Get the Library Version
- android.permission.ACCESS_WIFI_STATE
- android.permission.INTERNET
![ScreenXMPP.jpg](/android/forum/proxy.php?image=http%3A%2F%2Fwww.visualnet.inf.br%2Fimagens%2Fb4a%2Fxmpp%2FScreenXMPP.jpg&hash=6ca5cfcce549fc99a6b95cad32113179)
![Xmpp1.jpg](/android/forum/proxy.php?image=http%3A%2F%2Fwww.visualnet.inf.br%2Fimagens%2Fb4a%2Fxmpp%2FXmpp1.jpg&hash=b32e9583fb51ed6be5fd08ff70b83681)
![Xmpp2.png](/android/forum/proxy.php?image=http%3A%2F%2Fwww.visualnet.inf.br%2Fimagens%2Fb4a%2Fxmpp%2FXmpp2.png&hash=5996f12e226cf120923fac771d0ff312)
You can try your APP using web client in https://jwchat.org/
References:
http://xmpp.org/
https://jwchat.org/
* This version is fully functional, the only one difference is when sending a message the text "Donationware" is delivery with your message.
Please consider a simple €10 donation and I send to you the Library without "Donationware" text in a sendmessage method.
![](/android/forum/proxy.php?image=http%3A%2F%2Fwww.visualnet.inf.br%2Fimagens%2Fb4a%2Fbtn_donateCC_LG2.gif&hash=cff34af895682eebd262b074709d1769)
Look others libraries in http://www.visualnet.inf.br/store
* Put in this link because this forum accept only 512k maximum.
Attachments
Last edited: