EnableLanBroadcast & Example

Below is an example of how to get EnableLanBroadcast to work between two Android devices for the purpose of auto-connection between a Client and a Server. You need to test using two different devices as you cannot do this by running both the Client and the Server on the same machine. Make sure to add this permission to the Android manifest file:

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">

Here is the simple LAN Menu code for auto-connecting:

Here is ServerCallbacks script:

Here is ClientCallbacks script:

 To Document Top