Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am trying to make a chat application in android. Just a one on one chat. However I also want the chat to be synced with the web app that runs on the browser. I am confused about how to go about it. So I want my web app as well as the android app to be in sync. I have 2 things in mind.

One,use metoerjs for frontend and php for backend connected with a mongodb. I am inclined towards metoerjs for front end because it seamlessly syncs with the mongodb object and is a good real time js library. This would require me hosting my php script on an apache server and the front end running on node.

Is it possible to make http post requests to the meteor js server(and add stuff to my database) through my android device? If it is then I can do away with using php, and develop both the client and server side in javascript.

Second, use some xmpp client to set up the chat on android.But I have no idea how am I supposed to connect it to my webserver.

I am a complete beginner with server side scripting in javascript, noSQL databases and the xmpp protocol. So I would really appreciate if someone could point me in the right direction.

share|improve this question
add comment

1 Answer

Is it possible to make http post requests to the meteor js server(and add stuff to my database) through my android device? If it is then I can do away with using php, and develop both the client and server side in javascript.

Yes. What about just setting up an API on the server, than firing off a call to your server when the chat is submitted?

ie.

https://myServer.com/add-message?message=blah-de-blah&userid=1

I guess you'd want to encrypt the message and add some authentication.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.