Try to create a TCP socket which is bound to Wi-Fi network (for Android 5+)
On Android 5 and later, this method tries to create a Socket instance which is bound to a Wi-Fi network. If the phone is not connected to a Wi-Fi network, or the app lacks required permission (ACCESS_NETWORK_STATE), then this method simply creates a Socket instance with "new Socket();".
public static java.net.Socket createSocket(Context context)
|java.lang.Object||getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize|