I want to start a local network connection using the built-in Wi-Fi hotspot on Android devices. Is there a way to accomplish it? And how to communicate between two devices?<
Possible answers:
Before ICS and non rooted devices
There is no way you can connect to a device over wifi. There is no API to do. Bluetooth is your best option or user interaction.
Before ICS and rooted devices
I am not sure if someone hacked the code, but when I tried to do an automatic connection to a wifi spot I noticed:
Using ICS
With ICS there is a new way to connect devices through wifi called Wi-Fi Direct. Here is a link with some demos.