- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day, I'm trying to make a web socket with java, it is as a chat, but I don't find how make this, someone might help me with this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Buenos días, estoy tratando de hacer un socket web con Java, es como un chat, pero no encuentro cómo hacer esto, alguien podría ayudarme con esto?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
your question is a little bit unclear. Do you want to write a pure chat application or more something like a messenger. For a messenger I think using the Google Cloud Messaging for Android(GCM) makes most sense. With GCM it is not required to poll for new messages or hold a TCP connection open all the time. You find more information here: http://developer.android.com/google/gcm/index.html . I don't know if GCM would be also the first choice for a chat application.
For writing a chat application there are nice small examples including source code like that one here: https://code.google.com/p/simple-android-instant-messaging-application/ . There are also very easy to use XMPP libraries available that handles all the networking stuff for you. One example is Smack API: http://www.igniterealtime.org/projects/smack/index.jsp
Hope this helps,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for suggestion, I'm trying to make a web socket with html and jsp, is for work in real time, when you do some on an app, if I have the same app and permissions, I will see this change on app in time real.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
so you mean you want to use HTML5 web sockets on the client side (Android) and Java Server Pages(JSP) on the server side?
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Not initially think it will be both client and web server, android not yet.
Thanks you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so you are trying to do it in java..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ashwin, I have tried make an app that refresh on time real in each user of same app, the changes doing for the other user, like a chat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
just some more suggestions which might help you to write your application.I think I found a very sample using JSP for a chat application: http://ben-bai.blogspot.de/2012/01/jsp-practice-simple-chat.html .
I think you should also consider to use node.js instead of JSP. It is easier to use especially for html5 projects. There is a nice tutorial here: http://net.tutsplus.com/tutorials/javascript-ajax/real-time-chat-with-nodejs-socket-io-and-expressjs/
If you want to extend your chat for audio and video you can use WebRTC for your application. There is a really nice GoogleIO Talk about it and here is a getting started guide.
I hope this helps you!
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander, thank is very util your information, webRTC is a good option for my app, thank you! and if you know about some as chat rooms how make this with node js, express, socket io and session I will be grateful with you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
do you have any specific problem you are facing at the moment? It's hard to help if I don't know where you are with your development at the moment :-).
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,I need to apply to node js mvc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I never used a MWC framework with node.js. But this one looks very promising: http://sailsjs.org . It has a nice documentation. Does this help you?
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thnank you Alexander for you attention!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
Did JSP having SOCKETS?
Actually i am having a task in my company regarding chat application(one-one, one-two many). It is not company related task to test my effecicency but i am a fresher. so, i opted for Jsp (socket).
If it possible how to build such project. Please help me. Thanks in Advance

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page