Search code examples
androidwifichatp2p

Wireless (Wifi) Chat Application


I am a fellow Android developer and want to develop a similar app like Firechat for educational purposes

I just want to know what kind of packages and techniques I need to learn to develop a app like this

App Features : I Need to discover the phones which Have wifi direct and my App on Next I need to be able to send messages and start device to device communication and If the device I want to connect is not in range ,The message should Hop from one device to another till the destination is reached I think It can done by creating a mesh network

I have went through similar techonlogies like serval/Firechat/Opengarden ,But I am not being able to comprehend it


Solution

  • For being able to connect devices for peer to peer connection you have the following options:

    1. Wifi Direct

    2. Bluetooth

    3. Wifi Hotspot

    Here is a basic tutorial on how to build a chat over wifi direct http://developer.android.com/guide/topics/connectivity/wifip2p.html

    And for bluetooth http://developer.android.com/samples/BluetoothChat/index.html

    You can also import these sample projects in eclipse by:

    1 For WifiDirect -
    Go to New -> Android Sample Project -> Choose API level 16 (Android 4.1.2)-> WifiDirectDemo

    2 For Bluetooth -
    Go to New -> Android Sample Project -> Choose API level 16 (Android 4.1.2)> BluetoothChat