using XMPP with a .net server and android client - android

I have an android application (created in eclipse with java) that talks to webservices on a windows 2008 server using .net webservices. I am very interested in using XMPP for the chat portion of the app, but have not a clue how to implement this. Can someone help me with implementing the XMPP piece on the above server, as well as the client piece in the android app. I am basically looking for a step by step walk through (to include what server side software and client side software needed) as I have NEVER used XMPP and really need to finish this app.
Thanks

1) Find a server.
There are several XMPP servers available if you go to the XMPP site and check their handy list.
Personally, I'm using OpenFire and find it super easy to set up and use. Install, run it, and follow the setup wizard. I would not recommend trying to write your own XMPP server functionality into your own code as it gets complicated quickly. You can easily run a chat server side by side with your web services and have the app on the Client end communicate with both. This still serves up a seamless interface to the user.
2) Find a library for XMPP development on Android.
aSmack is pretty much what most Android devs use for this. (Info, plus link to code can be found here.) If you need more step-by-step help on how to develop this for the Android, I'd suggest searching for/posting more specific questions regarding how to use the library.
I hope this helps.

Related

developing an android application with servlet

I'm currently developing an android application. My application allows users to choose a picture from a gallery, add a comment and send it to the server. The server then saves it in database.
Currently I'm using HttpUrlConnection at client side and Dynamic Web Project with a servlet to process on server (I'm using eclipse with Apache Tomcat)
So the questions are:
Is it a proper use of this technology to develop my app. (does it violate any rules? Sorry I'm a newbie)
Does this technology affect anything if i want to expand my app?
Are there any better technologies to use in this situation and is it worth to use it?
No I think it is a better way to develop this. I have also develop a chat based app usign the same technologies.
It doesn't violate any rules. There are many apps in the market usign the same technologies.
Q-3.Are there any better technologies to use in this situation and is it worth to use it?
You can also use php or any other server side scripting language to do the same.
Because when you want to host your java app you may find difficulty for java hosting but for php and asp you can easily find hosting services.
I answer in order:
1- the client is different, the client is recomended create an android application.
2-You need have clear this: Android is an application, the server has to attend petition from android. The conection could be using webservices, API rest, or others ways.
3-Android need Java to be native, in the server side you can use, Ruby, PHP, Java, Python or any server programming languaje side. Is your choice.

GWT with clients: Web, IOS, Android. Starting new project

When I read that Google Inbox application reuse 70% of code for all three main clients (web,ios,android) I have been encouraged to learn GWT, as inbox was written mainly using gwt. Additionaly incoming Gwt Singularity framework convince me to this platform.
For now I will focus on web client, but in future I would like to expand the app to Android and IOS.
So I've started new project, have wrote some basic ui, entities and dao.
Now I need Your help.
Please give me some information about what transport mechanizm choose to support all of these three platforms.
I consider to user RequestFactory (less code, more job done- for me).
I now that RequestFactory supports Android, but couldn't found information about supporting IOS.
Second choose is JSON marchaling and gwtResty library. I supose that will work.
Another think is how to connect Android and IOS client to GWT backend?
Please give me some help, links, or Your experience on that subject.
Thanks.

WebRTC using Peerjs with Native Android/iOS clients

We're trying to build an internal system which will provide us with simple chat/video features using WebRTC. We have successfully deployed Peer.js client and server which works great over the browser.
However, we can't seem to find a fairly simple Android/iOS client/SDK to make it compatible with our PeerJS server.
We've tried looking into AppRTC and got the Android client running with their server, however we can't understand how to connect it to our PeerJS server since that Android client (and server implementation) seems really complicated (we're not JAVA experts).
I've also looked into EasyRTC, however it seems that they've pulled back their native SDKs, but the technology stack looks really close to ours.
My question is, has anyone got and Android/iOS Client working with WebRTC running on a NodeJS server? What are the possible workarounds to get this up and running natively on Android?
We're looking for a fairly simple Android SDK (links to libraries/sample projects) which could work with a PeerJS server.
Edit: We could build a signaling server (on NodeJS) ourselves, but how can we build the Android/iOS clients from then on?
I'm offering a bounty of 200 rep to whoever can answer our questions.
I don't know PeerJS but it seems like using websockets. If that's the case you have to implement WebSocket client functionality in you native clients (and various PeerJS internal connection/signaling protocol).
For native to native signaling, it's really simple because we only have to exchange SDP and ICE candidate messages between clients (via WebSocket or any other messaging mechanisms).
To connect to PeerJS server, obviously, we need PeerJS client implemented in Java or C(ObjC).
I'll be surprised if such implementation or SDK exists.
I don't know current state of AppRTC source, but in its old version, it hosted a WebView to run a kind of HTML+JavaScript signaling client.
That is, you can host a WebView and reuse your PeerJS client in Android/iOS apps.
You can have look at Crosswalk project. By follow Tutorial: porting Android app from Web App for WebRTC using PeerJS library. I have done it and it worked perfectly.
There are another option which is using http://phonegap.com/ to port from web app to Android/iOS but I could not make it work event just with "getUserMedia" API.
Hope this help
I found a example in here https://github.com/pchab/AndroidRTC1
On the server they used nodejs + socket.io + AngurlarJs.
On the client they used libjingle_peerconnection + socket.io Client.

Need help understanding xmpp xeps

First I am completely new to programming world.
I am trying to develop an app which will also have a website. I want to have a chat feature in it . After googling I found xmpp servers such as openfire jabber, etc and smack and like libraries. I understand that the the xmpp server can implement general chat features but do I need to install the xep files to get to use xeps?
What do I need to do on the server side and client side to implement the xeps?
You don't need to do anything to implement core XEPs on the server so no need to worry there (especially as you are only doing chat).
I'd suggest prosody.im as a quick easy server to set up and use rather than openfire.
I'd then look at the asmack library if you are doing android development.
Cheers, Lloyd.
I strongly recommend you this book:
Professional XMPP Programming with Javascript and JQuery - Jack Moffitt
I'm building single chat an application javascript+strophejs just reading this book.
Good luck.

Soap Client on Android to access Salesforce APIs

I want to develop a application on Android platform to connect to salesforce. From what i have found salesforce provides service API's which can be used to connect to salesforce servers by creating a Web service from the client side application.
Salesforce developer site has examples of creating such a Web service by using Apache Axis as the SOAP client and using the WSDL file downloaded from the salesforce website. I want to know can this be done from Android platform?
Is there a version of Apache Axis ported for Android? I did some googling and could find that Android does not have a inbuilt SOAP client and usually Ksoap is used on Android.
But I have also read that KSOAP doesnt support WSDL.
I have seen the above question asked before but quite a while ago, As Android platform has emerged eversince I want to know what is the current situation and options of doing this.
Also, Since I am new to Android and development on Android if anyone can direct me to a sample code snippet, which creates a Web Service from android to connect to salesforce, I would be higly grateful.
Thanks in Advance.
Edit: Is there any other way to develop an Salesforce client on Android without the above approach? I am running out of ideas :(
Not really an answer, but...
There will be a webinar about REST API for Salesforce soon. With pure HTTP and JSON you might be able to avoid SOAP problems :)
It's a "developer preview", meaning that probably this functionality will be officially released this autumn/winter.
https://www.developerforce.com/events/rest_developer_preview/registration.php?d=70130000000FV4P
At the end of they day, SOAP is just XML over HTTP, Android (at least 2.1 and up, not sure about earlier versions) have built in XML parsers and serializers, so you could manually build/parser the relevant soap messages that you care about (this is probably not a big deal if you only need to make a few different types of calls, but will be a chunk of work to do them all). Depending on your timeframe, you could wait for the REST API, which'll let you do json instead of XML. (this is currently in pilot)

Categories

Resources