Take the 2-minute tour ×

I want to develop an chat application to chat between two or more android devices using wifi network.The application should be able to send or receive strings from each other. I have an experience of using Bluetooth network between pc and android. Can any give me any suggestion or right direction. Thanks in advance.

share|improve this question
Suggestion: do a web search and a search on existing questions, as we seem to get someone posting this one about once per day. –  Chris Stratton May 8 '12 at 4:17
add comment

3 Answers

up vote 3 down vote accepted

You can be able to chat between two android devices in Android Version 4.0.There is an API called 'Wifi P2P'.More information can be had from here:


share|improve this answer
There are Wifi APIs for android 4.0 . But i am looking for something for android 2.2 or 2.3 Is there any API available for android 2.2 or 2.3 for wifi ? –  Mamun Sardar May 9 '12 at 5:04
add comment

maybe XMPP will help, google talk uses the same protocol.


things you need to do:
1. you need a server computer to run XMPP server, there are lots of open source implementations.
2. you need a XMPP client running on your android device, there are also lots of open source implementations running on android platform.

share|improve this answer
add comment

If you are thinking about connecting devices that are under the same WiFi AP/router and without setting up any server, then I would suggest you to consider using UDP multicast which has been available since API level 1:


UDP does not guarantee data delivery (could be lost), so I would use UDP multicast for device discovery, and open up a TCP connection for data that requires guaranteed delivery. TCP listening port can be advertised via UDP multicast so that everyone can connect with each other over TCP. (There may be 3rd party tool that does this low level stuff for you.)

share|improve this answer
add comment

Your Answer


