John van de Waeter 7 Posted March 21, 2021 Hi All, When a user goes outdoor with his phone, network-connections may switch from WiFi to Mobile data. There's no problem when both networks are ipv4 or ipv6, but sometimes the WiFi is ipv6 and the Mobile data connection is ipv4, or vice versa. In that case, putting a hostname (in idUDPclient or idHttp) between square brackets (coming from ipv6) results in a "connection refused". Now this https://delphiworlds.com/download/libreachability-a-for-arm64/ does a nice job. It tells me that the networks has switched, so I can take appropriate action and check for ipv4 or ipv6 connection. Works great on Android 32 and 64, and probably IOS 32 bit (I cannot test). However, the library for IOS 64 bit (libReachability64) doesn't work anymore for IOS 64 bit. Compiling fails. Does anyone know if this library is updated so it can be used in Delphi 10.4.1 ? Or another way to be informed when network changes? tia! John Share this post Link to post
Dave Nottage 557 Posted April 27, 2023 On 3/22/2021 at 5:41 AM, John van de Waeter said: Does anyone know if this library is updated so it can be used in Delphi 10.4.1 ? That old code has morphed into this: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/Connectivity which no longer requires the separate static library. It should be able to be used in 10.4.1 (perhaps with changes if necessary) Share this post Link to post