Search code examples
javaandroidwifip2p

Android Wifi P2P without asking user


is there a possibility to let an Android app communicate over Wifi P2P with other device, wich has the same app running, without asking the user to communicate for every device. The problem is: I want to make a multiplayer game for many users on the same time and the app should not ask everyone to pair the devices with the others. It should be done in background, without showing messages to the users.

Is this possible?

Thanks for your help.


Solution

  • As per Android Developer Forum:

    <manifest>
        uses-feature android:name="android.hardware.wifi.direct" />
        ...
    </manifest
    

    Nowhere the page states that you would need additional passcodes from user to do so.

    Check the demo from Google here