You can connect to your Android device with Wi-Fi via a standard TCP/IP connection.
This is especially useful when developing applications that monitor USB-related events, because USB connections can interfere, such as USB connection/disconnection events.
The first thing to do is to connect your Android device and computer with a USB cable as usual.
Also make sure that your computer and device are connected to the same Wi-Fi.
Next go to the IP address of the device, open setting->wi-fi->advanced (Set->wi-fi-> Advanced) page, the bottom of the list will show the current Wi-Fi IP address
Run the following command at the terminal:
$ ADB devices//Verify that the device already belongs to debug mode
List of devices attached
0070015974D30E4B Device
$ adb tcpip 5555//restart ADB daemon in TCP/IP mode and then listen on 5555 ports (default port for ADB)
$ adb Connect 192.168.1.104//Use the ADB service on your computer to connect the IP address on your device (using the default 5555 port)
$ ADB devices//Verify that computers and devices have been successfully connected via TCP/IP
List of devices attached
192.168.1.104:5555 Device
Next you can unplug the USB cable and develop it as usual with the IDE
The ADB daemon will remain in TCP/IP mode until the device restarts, or if the ADB USB is running, the command restarts the USB daemon
Note : Not all devices support Wi-Fi connectivity. Similarly, the communication performance under a Wi-Fi connection can be worse, which can be cumbersome when you need to deploy a larger application.
Excerpt from the "Android programming Combat"
Android Development Supplements (a) connect adb with Wi-Fi