I want to create a chat application (without internet connection) for Android-based on P2P communication via WI-FI (or Bluetooth) between 3 or more devices. I would like every device to have a direct connection to all devices. I know that android API provides the WifiP2pGroup class, but in this case, one device is a groupOwner and the other are clients and the other ones do not have a direct connection with each other.
Is it possible for each device to be a groupOwner and client for other devices at the same time (like on the image)? Is there another way to solve my problem?