In Android ICS, Wireless P2P (WiFi Direct) API is provided.
I tried to develop an Application which can connect 2 phones via Wireless P2P automatically if the MAC address match.
From SDK documentation, I have to following steps:
Once, the connect() API is called, Farside phone will Pop Up a connection Authentication Dialog. (Depending on WifiP2pConfig)
Is there anyway to connect automatically, without having Farside to popup the Dialog?
It seems that automation of authentication dialogs is not possible, and this makes p2p routing impossible as well. Right now, the WpsInfo class (which is used in the WifiP2pConfig class that gets passed into the WifiP2pManager's connect() function during peer connection) only displays authentication dialogs in four ways: DISPLAY / KEYPAD / LABEL / PBC. I believe that PBC (push button config ) is the default and is what you refer to. The other three options require the user to input a type of pin, making them even more unusable for automated connections. Maybe if we were to find the type of this authentication dialog class, we could automate the clicking of the 'ok' button?
I wish a new option could be added that would give the application the ability to authenticate a connection, rather than the user. This user based authentication looks like its been carried over from the bluetooth api, and severely limits the usefulness of wifi direct. Maybe the folks at google could help us out?