Must Have Check Network Connectivity State Library For #Delphi XE8 Firemonkey On #Android And #IOS

Delphi XE8 Firemonkey Check Status Internet Connection Android IOSDeveloper Dave Nottage has upgraded his network state library for Delphi XE8 Firemonkey. The latest version of the component includes an IOS64 version of the static libReachability.a library. If you are doing any kind of internet connections in Delphi XE8 this is a must have library. You should check if there is an internet connection on Android, IOS, OSX, and Windows prior to attempting to making a connection. The component is free. Even if you are only using the app tethering functionality of Delphi XE8 Firemonkey you should also use this component. There are multiple ways to check for an internet connection and this is one of them. In certain instances it is not enough however to just use the library (like for example when an IOS device has it’s internet connection disabled). A second important piece that I use is this function created by Daniel Magin (you can change out the google.com host for your own domain name):

Be aware however that on IOS you must make internet connections asynchronously otherwise you risk the chance that IOS will close your application. If your connection takes more than ~10 seconds IOS may think your app is frozen and close it. What I do is set up a private boolean variable which contains the internet status. I then update this variable using the various methods and when I need to know the internet state I just check the boolean variable. This library and code should also work in Appmethod. You can check out our previous post about the network state component here.

Head over and download the network state component library for checking the internet connection in Delphi XE8 Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Must Have Check Network Connectivity State Library For #Delphi XE8 Firemonkey On #Android And #IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

2 Responses to Must Have Check Network Connectivity State Library For #Delphi XE8 Firemonkey On #Android And #IOS

  1. Pingback: Ten Tips For Building Professional Multi Platform Enterprise Apps With Delphi XE8 Firemonkey | Delphi XE5 XE6 XE7 XE8 Firemonkey, Delphi Android, Delphi IOS

  2. Juande says:

    The code is good, but does not works in Android 6.x versions or above
    Regards.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE8 Firemonkey IOS8 Simulator Hotfix
IOS8 Simulator Hotfix For #Delphi XE8 Firemonkey On #IOS

Embarcadero has released a hotfix which patches some issues with the IOS8 Simulator support in Delphi XE8 Firemonkey. It is...

Close