I need to dynamically construct network of interconnected Android devices. I have seen previous question in topic which says it's impossible:
Android Wifi direct multiple connection ad-hoc
However, Android documentation says that since Android 4.0 it is possible to make an ad-hoc connection:
http://developer.android.com/guide/topics/connectivity/wifip2p.html
I would love to check it myself, but I'm short on time while being completely new to Android development. I know, that it's generally possible to connect to ad-hoc network. But is it possible to connect to more than one ad-hoc network? And - more specifically - is it possible to connect to ad-hoc connection while hosting another one?
The answer is Yes and No, depending on what you are actually asking for..
If you are using the WiFi Direct in normal way, then your device can be wither Group owner or client, never both. thus that case the answer is No.
Then if you want to experiment with the Access points created with WiFi Direct API, then the answer is likely Yes.
Basically the idea is that you use CreateGroup from the API to create a WiFi Direct Group. Then instead of connecting the clients to it via the API, you actually use the Access point it creates.
Issues here is that you need to be able to deliver the password & id for the access point, alongside your IP-address to the "client" that connects to it. Anyways, you can use the normal Service discovery for that.
Then with the "client", after you get the connection(and new IP address), you could you use CreateGroup to make a new access point which other "clients" could connect.
There are plenty of small issues there, but you could use my "work on progress" example as starting point: Thaliproject/WAPConApp