Phone switches Wifi Network from IOT Wi-fi to known network in Android 14

87 Views Asked by At

Our Android app connects to an IOT device Wi-Fi programatically and then communicates over TCP/IP socket. Connection to IOT Wi-Fi is initiated using ConnectivityManager requestNetwork.

We have a weird observation where in latest Android 14 (Pixel 8 Pro), our app initiates wifi connection, Phone connects to IOT Wi-Fi , but by the time socket is created, Phone toggles the Wi-Fi network and switches back to some previously known Wi-Fi network.

However, if there is no known network then this behaviour is not observed and it stays connected our IOT Wi-Fi .

The behaviour is not seen on Android 13 or below.

Expected behaviour: Phone should stay connected to the network(IOT Wi-Fi) initiated by App Actual behaviour: Phone switches to a known Wi-Fi network instead of staying connected to the network(IOT Wi-Fi) initiated by App If we remove(forget) all known network in the phone, then issue is not observed.

0

There are 0 best solutions below