Daniele
Daniele

Reputation: 53

On Android, how to check if an internet address is reachable?

I'm rewriting an old application for Android written with Delphi XE. In short, this application connects to the server (IP address + port number), sends an SQL request, and processes the received data.

Sometimes, the server is down and the application "freezes" for several seconds (even minutes) before showing a "server problem" message. Now, I need to check if the given IP address is reachable (if the server is offline for any reason, the application will stop).

I tried to use some answer(s) found here without any result:

Android - Checking internet connection by pinging url

Delphi XE6 and Android Ping

Android - Check internet connection by pinging url address

Is there any solution without using a raw socket under Delphi 11.x?

Upvotes: 0

Views: 140

Answers (0)

Related Questions