WiFi Connection in Multiplayer Android Game

view story

http://stackoverflow.com – I got struck in my app in a part where i need to share data using wifi between two android device. the app is actually a turn-wise multiplayer game like chess and i cannot find how to make the connection part..so help me how to use wifi p2p connection. i already read http://developer.android.com/guide/topics/connectivity/wifip2p.html but i cannot understand these parts: requestPeers() method callbacks onPeersAvailable().now how to implement that function? onPeersAvailable() returns WifiP2pDeviceList object..now if i want to show it in a listview how can i convert it into a ArrayAdapter or so (HowTos)