Chat implementation Android - android

I have read many answers on StackOverflow but still found a need to ask this one.
I am making an Android Application in which i have to implement simple one-on-one chat (Just text chat).
I have implemented QuickBlox for now but I would like to implement the core integration into my application. i.e. using a web xmpp server and socket connection. As I dont want to use any third party API. For example Whatsapp has it's own implementation and doesnt use any third party API.
What all I will need for this and what is the process of implementation.
Thanks in advance.

You can do that easily with a Websocket server [can be implemented with Nodejs, Ruby, Java, etc] and WebSockets Client implemented in android.
It is really easy to make a websocket server in nodejs and upload it to Heroku.
Access the websocket server from the android using a java Websocket client.

Related

What should be the server side for a chat app?

I'm trying to make a whatsapp like chat app, where I want a server to receive requests. I am thinking of making php server page. Would it be the right choice? or should i look for some cloud computing servers? Please convey some opinion..
You should have a look at socket.io, which is a websocket package for nodejs. In its documentation there is a chat server example.
http://socket.io/get-started/chat/
I would recommend you to use NodeJs in this case. Node has a asynchronous nature, so its the best thing to use for chat apps. Its also a lot faster than PhP in most use cases. Another thing to consider is that NodeJS hosting is pretty cheap. In fact, you can use OpenShift and start testing your app for free in a redhat server.
If you wanna know more about nodejs: http://www.nodejs.org
More on Openshift: openshift.redhat.com
If you are creating a chat app like Whatsapp, use the following server that would help to build more easily.
Yaws - An Erlang-based web server that can also run as a standalone web server
Lighttpd - Another web server that is highly secure, swift, flexible and compliant with web server standards.

How to Implement our own (customize) server code for Openfire

I am making an android project for which I need to use GCM CCS. So I chose openfire server
as third party app server. I have Installed and configured openfire server. I have sample app server written in Java, using the Smack library with me https://developer.android.com/google/gcm/ccs.html.
Now I want to implement this code in openfire server. I have followed "Building source code" from igniterealtime documentation (http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/source-build.html#jar).
But still dont get any idea how to edit(write/implement/access) code for openfire server. I have successfully installed and configure ant in my pc.
My basic question is : how to make openfire server to work according to our needs?
I am very new to all this so kindly share any good tutorial or material regarding customized XMPP server. Thanks in advance...
I don't know much about GCM CCS and those things. For openfire development you should look at writing plugins to openfire. One can use openfire API to write plugins to extend the functionality of the server. Have a look at existing plugins and plugin development using openfire.
If your need is to change the functionality of the server. You have already build the server. The source code is there, just look into your required module, start placing logs first, touch minimal functionality and then change it according to your needs. Check the license schemes as well.

Is there a way to implement GCM (or CCS) with a server using c++?

I'm working on an App that I've made for both iOS and Android. On the iOS side, I use a constant TCP connection and JSON messages for the push notifications. I want to do the same thing for the android version, however I'm not sure if it's possible. I think using the Cloud Connection Server http://developer.android.com/google/gcm/ccs.html is the way to go, however it only shows samples for Java and Python. Is it possible to use this in c++?
You can choose whatever programming language to desire to implement the server side. The question is whether you can find an easy to use XMPP C++ library for connecting to the Cloud Connection Server.
I assume it will be easier to find an HTTP C++ library for sending HTTP requests to the GCM HTTP Connection Server. If you are not planning to use the upstream functionality (device to cloud), you don't need to go though the trouble of implementing/using the XMPP protocol.

Better Way to implement the chat application using XMPP on Android?

Hi i want to implement the Chat application in android using XMPP (To
avoid the GCM notifications because GCM uses request response
process).
i have done the 70 perc functionality using Smack library
and OpenFire server. but after completion of these i came to know
about the QuickBlox SDK. I don't know completely about that but few
people are saying that it is good api by seeing the features..
can any one tell me that is it correct way of implementing the chat
application using smack for xmpp . or we have any other good api which
uses xmpp for android .
The Stackoverflow question "Android and XMPP: Currently available solutions" provides a good overview of XMPP client libraries for Android.
Another good resource is xmpp.org/xmpp-software/libraries.
You can use QuickBlox1 for free.
It provides XMPP server out of the box with lots of features, you can read about features there http://quickblox.com/developers/Chat
Here is an example how to start using QuickBlox with aSmack library http://quickblox.com/developers/Android_XMPP_Chat_Sample
1Quick disclosure: I am a developer at QuickBlox.

XMPP and Android interaction

I am currently finding about how to build a XMPP client application on android 2.1.I came across this link which somewhat talks about the same problem.I am a newbie to android dev and thus found the solution given there to be difficult to digest.
The system currently has Active MQ as a JMS provider.My job is to fed the messages coming from JMS to the XMPP server and then develope XMPP client on android 2.1 which will listen and show notification to the events pushed by the server.
I have following concerns(which might sound foolish)
1.How do I push the events from JMS to the XMPP server which will in turn push them on android?
2.Which XMPP server implementation I should use?I have 3 options
* Openfire: Very mature (was a commercial product), but sounds like it's heavyweight, written in Java
* Prosody: Lightweight and easy to use, written in Lua. Doesn't have PubSub module yet
* Tigase: Also lightweight, written in Java, supports PubSub
How do I test and setup these servers.Do I need PubSub funcationality for my app?
3.For XMPP client I came across Smack API given here which is updated like 2 years back.Can anyone please tell me how do I make use of it for Android 2.1.If possible can anyone please mail me latest working Smack jar files.
Thanks,
Ameya
Why don't you use eJabberd as your XMPP server ? It seems to me that is has the best support of pubsub and is a very efficient server. We use it since 2 years now without any issue. And on the client side, yes, asmack if definitively the open source choice, but has some drawbacks: it does not support pubsub, and has some very nasty bugs that you will encounter if you dive into some of its functionalities. We had to improve and extend it a lot to implement our full featured social network IM/microbloging/geolocalisation client for Android (called BuddyMob) and now we provide an extended version of Smack as a commercial product (see http://www.ubikod.com/products.htm). Some of our bug fixes has been integrated into the Smack trunk, but most of the extensions we did are not free.
Look at asmack for an android Smack client: http://code.google.com/p/asmack/
You can push messages from JMS to XMPP using Apache Camel - http://camel.apache.org/xmpp.html

Categories

Resources