问题
I am working on a chat application for android. This chat application is for sending messages from one device to another using internet(GPRS,3G,etc) from this application. please tell me a way to implement this.
I thought using web services is more data(internet) consuming and less efficient.is this right?
I worked on server and client sockets. I ran both server and client classes in single device and messages can be transfered from client socket to server socket and vice versa.Now i want to message between two devices using server socket on web server and how to connect to server from Android Devices.
回答1:
This helps you to solve Push Notification in Android Chat applications. You may also build your own push notification server backed by the Really Small Message Broker(a small program that sends and receives data in the form of messages to and from applications and devices over TCP/IP network connections.)
回答2:
You can use the Xtify push notification service to implement the chat feature. It is much easier to use with their provided sample code and all.
回答3:
You should try this...quickblox will be easier enough to implement server based applications. As in your case you needs interaction with the server to built a chatting application in Android.
来源:https://stackoverflow.com/questions/5203883/how-to-implement-chat-application-for-android