B4A Library XMPP/JABBER - Best protocol to IM for B4A

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User

Look the version 1.0.2
https://www.b4x.com/android/forum/threads/xmpp-jabber-best-protocol-to-im-for-b4a.52076
 

walterf25

Expert
Licensed User
Longtime User

MiguelAlvarez

Member
Licensed User
Longtime User
 

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,

i installed jabber service (openfire) to my server.

i tried with app which i download from google market. it works well.

i have problem with library

i connected to server but cant pass to Login

i got this error "GetUser = null" and after this

cant create chat or get message
 

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello Alberto.

its Openfire on windows 2012.

i can try yours but for my project it should work with mine

thanks for help
 

Reids

Member
Licensed User
Longtime User
Hello I tried using jabber.hot-chilli.net as hosts
host is xmpp.alpha-labs.net or jabber.alpha-labs.net
but it not logged due network exception

B4X:
** Activity (main) Create, isFirst = true **
JAVA [Initialize] eventname = objXmpp
Log = [objXmpp_onInitialized]
JAVA [About]
Log = XMPP About = XMPP Library - By Alberto Iglesias (alberto@visualnet.inf.br)
JAVA [Version]
Log = XMPP Version = 1.0.3 ** DONATIONWARE **
** Activity (main) Resume **
JAVA [Connect] Connected to xmpp.alpha-labs.net Connection is secured? true
JAVA [GetHost]:xmpp.alpha-labs.net
GetHost = xmpp.alpha-labs.net
JAVA [IsSecureConnection]
JAVA [IsSecureConnection]: True
IsSecureConnection = true
Log = [objXmpp_onConnected]
JAVA [IsConnected]
JAVA [IsConnected]: True
JAVA [Login] ERROR:android.os.NetworkOnMainThreadException
JAVA [GetUser]:null
GetUser = null
JAVA [SendMessage] message = ** DONATIONWARE ** my message
Delivery Message = ** DONATIONWARE ** my message
Log = [objXmpp_DeliveryComplete]:** DONATIONWARE ** my message
JAVA [IsConnected]
JAVA [IsConnected]: True
JAVA [Login] ERROR:Xmpp exception reidsneoconflict(409)
JAVA [Login] ERROR DISCONNECT
JAVA [GetUser]:null
GetUser = null
** Activity (main) Pause, UserClosed = false **

sample work well on chaotic.de hosts but not work on other public hosts, give error "ERROR:android.os.NetworkOnMainThreadException" on logged in
I research on other site too, it need to changed either SDK 11 or SDK 14 but not work, I need use it to communicate to yahoo messenger or google talk
so I need working host with Y! Gtalk support

thank you




EDIT :
fixed by adding on create

If p.SdkVersion >= 9 Then
Dim r As Reflector
r.Target = r.CreateObject("android.os.StrictMode$ThreadPolicy$Builder")
r.Target = r.RunMethod("permitAll")
r.Target = r.RunMethod("build")
r.RunStaticMethod("android.os.StrictMode", "setThreadPolicy", _
Array As Object(r.Target), Array As String("android.os.StrictMode$ThreadPolicy"))
End If


BUT :
message still cannot send to yahoo messenger
 
Last edited:

nw11

Member
Licensed User
Longtime User
Hello Alberto,

is there any chance to have this library for ios (b4i) ?
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User

Erwin Andersen

Member
Licensed User
Longtime User


Hi,

If i need the source code...how much this cost ?

Thank you
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…