|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Suleymanov |
Currently my workaround is to request ad (AdMob) and see if it fails to load to detect there is no or poor internet. But is there a straight forward easy way of checking internet?
|
|
|
|
Reply From: |
MrEliptik |
From what I know, and looking through the docs, there’s no API to check internet connection. Your approach is usually what is done to check internet connection.
To make a simpler request you could request https://google.com or https://example.com/ which should always be up.
To add to this, you can check multiple websites that should always be up (google, amazon, bing) stopping when you get a hit, just in case the user has one of them blocked
timothybrentwood | 2021-05-06 11:33