WebClient SparkWeb vs JwChat for openfire server (XMPP) - java

I am newbie in XMPP. I am trying to create a multi user chat using in a spring framework project with xmpp. I am using openfire as chat server. I am very confused for what client should i use for chat. I have gone through some like SparkWeb, JwChat and strophej. But can't figure out for which one should i go?

Related

How to create chat with API Gateway using sockets [JAVA]

I am trying to create small aplication with CLI, API and microservices. I've already created a few needed microservices eg. login, registration. Now, I am focused on creating chat. I have no clue how to corectly comunicate client (CLI) with API(server that choose mode that user send) and API with microservice. I work with G4G code trying to convert it to my purposes: Server, Client. I am adding simple picture of my project.
Simple example:
Another more detailed but in native language

how to create nodejs xmpp server and android xmpp client

I want to add chat module to android app. Firstly I want to use XMPP using Nodejs. How nodejs xmpp server works with android client.
Can nodejs xmpp server can communicate with android app? if yes than, how can i create simple nodejs xmpp server and simple android app that both can communicate.
If you have any other solution please let me know.
I am tried socket.io but i dont want to use that. It is not worked stable on android client side. Some messages send some not send. I am used few solutions for solve this problem (ping pong, heartbeath, change java client libraries for socket io, ...). But nothing changed.
My aim is to create stable fast chat module to android and ios application using with nodejs server.
Please guide me, thank you in advance.
Have you tried checking other solutions like ConnectyCube, Firebase, Layer, etc.?
They provide a ready backend and all you need to care about is configuring your client-side app.
Some of them even have ready Android client-side libraries which can be integrated in your app and speed up the development.

Is there any way I can implement a chat on an android app that already uses a JAVA webservice with REST API?

I'm developing an Android app that consumes a java webservice with REST API and make the DB(MySQL) persistence with Hibernate. Now, I want to add a chat on the application, but I don't really know how to start, if I use GCM or other options, so far it's working with threads that check for new messages every second. However, this seems very wrong as it consumes too much of the server. Is there a better solution, maybe a tutorial or just some tips on how to proceed?
From what I understand, this will be a two-way communication because it will be a chat app (server -> client, client -> server). In the case of using GCM, you will need to communicate via an XMPP library.
On the server side, an XMPP library should be able to register a packet listener that listens for incoming messages. Look at this implementation.
On the client side, you need to register a listener as well. The sample code should suffice to explain this.

java code to get chat history between two users using smack api from openfire server

I am new to Smack API and i want retrieve chat history b/w 2 users from openfire xmpp server. For this, is it required to add any extra plugin or change of any settings required in open fire? Pls somebody share some sample java code to retrieve chat transcript between two users.
Thx in advance.
By installing Open Archive plugin in the Openfire server you can see the chat conversation between two user from the Openfire admin panel which is pretty easy and that is web based too.
But if you want to retrieve the chat history from SMACK client, then remember neither XEP-313: Message Archive Management nor XEP-0136 Archive Messaging are currently implemented in Smack.

XMPP in Google App Engine and Android for a chat application

I want to build a simple chat app where users can send messages to each other.
Can I do it with XMPP service from Google App Engine?
In their tutorials and all the tutorials I found on the web it was an implementation of a bot server. I also found similar tutorials but they are in python.
Is there a good and full tutorial that can guide in server and client side?
Yes, you can use XMPP/Smack library available as a third party library. With this you can create you own custom chat application same like the one's available in the market.
You probably want to use the Channel API if you want to build your own chat app. That's for sending messages to browers.
The XMPP API is for sending messages to XMPP clients. ie if you want to send a message to the chat client that's built into gmail, or a gchat client, or facebook chat.

Categories