iOS internet reachability for other platform?

Hi,

Currently trying to find in the doc if there is a way to check the internet connection status for a standalone build so that for example I properly adapt my features if the user is connected or not.

there is such a check, but only for iphone it seems. iPhoneSettings.internetReachability

How can I then detect is the user is online or not when in standalone?

thanks for your help,

Jean

FYI iPhoneSettings.internetReachability also works for android

but for general cases try somethign like this
`

IEnumerator doInternetStuff()
{

float duration = 0.0f;
float connectionTimeOut = 7.0f;

WWW www = new WWW(url);
while(!www.isDone && duration < connectionTimeOut && www.error == null)
{
duration += Time.deltaTime;
yield return 0;
}

if(www.error != null || duration >= connectionTimeOut)
{	
	print("time out!");
	return false;
}

else
{
	//do stuff with internet data
}

}
`

so if it times out, then they dont have internet access, or just cant get the internet data, otherwise you are good to go.

To truly know you’re online, you need to implement “captive portal detection”, to know if you’re e.g. hitting a public WiFi login page. So just checking Application.internetReachability or doing a Ping to some address doesn’t guarantee you can successfully make connections or make WWW requests.

I have made an easy asset called Internet Reachability Verifier. It keeps you up-to-date whether you have verified internet access (WWW requests can be done).
More info here: http://j.mp/IRVUN