Most phones are going to have both Cellular and Wifi at the same time and GetLocalIp is going to return the IP of the cellular network first most of the times it seems. Instead this sort the network interfaces to prioritize Wifi over Cellular.
Works for my use-case, not sure this is best approach tho, so feels free to just close this.
Most phones are going to have both Cellular and Wifi at the same time and
GetLocalIp
is going to return the IP of the cellular network first most of the times it seems. Instead this sort the network interfaces to prioritize Wifi over Cellular.Works for my use-case, not sure this is best approach tho, so feels free to just close this.