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
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
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.
Look others libraries in http://www.visualnet.inf.br/store
* Put in this link because this forum accept only 512k maximum.
Attachments
Last edited: