He probably needs Java code since he’s working on Android. The Java equivalent — which I believe works on Android — should be:
InetAddress.getByName(host).isReachable(timeOut)
More Related Contents:
- Detect network connection type on Android
- NetworkOnMainThreadException [duplicate]
- How can I connect to Android with ADB over TCP? [closed]
- Android check internet connection [duplicate]
- Comparison of Android networking libraries: OkHTTP, Retrofit, and Volley [closed]
- Volley – POST/GET parameters
- How to configure a static IP address, netmask, gateway programmatically on Android 3.x or 4.x
- Capturing mobile phone traffic on Wireshark
- How can I monitor the network connection status in Android?
- How can I get the “network” time, (from the “Automatic” setting called “Use network-provided values”), NOT the time on the phone?
- Create a NinePatch/NinePatchDrawable in runtime
- ConnectivityManager getNetworkInfo(int) deprecated
- How to tell if ‘Mobile Network Data’ is enabled or disabled (even when connected by WiFi)?
- Simulate low network connectivity for Android [closed]
- Programmatically getting the gateway and subnet mask details
- Android emulator: How to monitor network traffic?
- How do I Use AutoCompleteTextView and populate it with data from a web API?
- Can Android do peer-to-peer ad-hoc networking?
- Android event for internet connectivity state change [duplicate]
- Android: How to monitor WiFi signal strength
- Download Manger not working in Android Pie 9.0 NetworkSecurityConfig: No Network Security Config specified, using platform default
- Send request over WiFi (without connection) even if Mobile data is ON (with connection) on Android M
- Determine device public ip
- Detect wifi IP address on Android?
- BroadcastReceiver receives multiple identical messages for one event
- Android : Check 3G or Wifi network is ON or Available or not on android Device
- Difference between getContext() , getApplicationContext() , getBaseContext() and “this”
- Android ListView with onClick items
- Getting Data from Android Play Store [closed]
- Using a broadcast intent/broadcast receiver to send messages from a service to an activity