hello,
i developed a pure android/java library/components for peer-to-peer communication among a group of devices (>2). It supports wif, wifi direct, mobile hotspot and diff means for peer discovery and connection initiation (multicast, NFC tap, scanning QR code). You can find the source code here:
https://github.com/yigongliu/PeerDeviceNet_Src
More detailed API info:
http://www.peerdevicenet.net/api.html
There are a few samples: chat, draw-with-peer, rotate-cube-with-peer.
Have fun.
Yigong