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

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.

Related

How to set my Openfire XMPP server with conversation?

I have downloaded a code for XMPP Android chat client from here.
I want to setup my own XMPP Openfire server with this code, I cant find any config file there, can anyone tell me how to setup my own XMPP server with this application, or maybe I am missing something?
Download openfire from this link and install it on server, you can also install in on your local machine as well , it require Java Run Time Environment to be already installed on your system. There are already lots of tutorials/guides available for openfire installation.
Once you have installed openfire then you can run it alongside any XMPP client. It could be Pidgin, Gajim, PSI or Android based Conversation, Yaxim clients.
I would suggest you to write your own client because if you are new to android you might not be able to grasp completely How XMPP works at client side. I hope it help a little
I have just read that Conversations will automatically look up the SRV records for your domain name which can point to any hostname port combination.
So my problem is solved now. Just read the README.MD.

NodeJS Alternative For Android

I have visited many blogs and questions looking for a way to use android as a client and nodejs as a server for my app. I came up with a solution that is to use PhoneGap like frameworks so that it could act like native but is not in reality. I need to use native android sdk and connect with NodeJS server (using SocketIO) to create my app. Is there any way I could do this?
P.S I want to know that while I set up by GCM can I pass my IP and port that I have created in my socket.io file to the GCM?
Cordova (hence PhoneGap) allows you to use most of the hardware APIs. PhoneGap nowadays is just a build service of some sorts.
The Cordova website and plugin store explain all the details. But t WebSockets are just an upgraded protocol or feature of TCP. Any newer technology supports it without any dependencies, but in dependence of the network you're traveling in.
Without diving deep into the code here at socket.io-website, I reckon that the initial build of your Cordova app is a WebSocket implementation to the server. So you got everything bootstrapped already.
What this tutorial doesn't explain is how to connect to the server. But read it up here.
I have no prior experience but Google Cloud Messaging seems not to be in the scope of the problem of socket.io. Once you have a connection to the socket you can send to the client whatever payload you want and might or might not need GCM anymore. If you need to send stuff via GCM read up on the the GCM node module.
Passing IPs around shouldn't be much of a problem since you're are running a public service anyway. You'd need to secure it anyhow of course.

Chat implementation 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.

Android xmpp client xabber

I have been searching for Android xmpp clients. I came to know about asmack for android. I have also found xabber for android here . I have downloaded the code and able to run it successfully. I am not able to get any documentation of xabber APIs.
Is it possible to use this xabber client for my custom XMPP server.
If u know any other good Xmpp clients for android , please suggest
me.
Smack is Java XMPP library, asmack is a Smack build environment for android, it is well maintained and you can get precompiled libraries. You can view Smack documentation and samples here. Xabber - is one of XMPP clients which uses Smack library(custom fork with some modifications) and you may use official Smack documentation when digging into xabber sources.
You should definitely have a look at Yaxim:
https://github.com/pfleidi/yaxim
Is it possible to use this xabber client for my custom XMPP server.
Yes, but i'm not sure.
If u know any other good Xmpp clients for android , please suggest me.
The best list of applications that implements XMPP is on xmpp foundation own site. https://xmpp.org/xmpp-software/clients/
I hope help you.

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