Check if Android device using wifi?

How Can I check if an android device is using a wifi connection or not? I’d like to have an option to auto update my game when connected to wifi.

@265lutab it is old post but may be it will help,
try this,

void Start()
string url = “”;
WWWForm form = new WWWForm();
WWW www = new WWW(url);

   if (www.error == null)
        //means wifi or mobile data is on
       //do whatever you want here  like suppose
        Application.LoadLevel("login scene");

       //means wifi or mobile data is off,
       //now do whatever you want to do. 


Here’s what I ended up using

public IEnumerator CheckInternet(){ 
		WWW internet = new WWW("");
		yield return internet; 
		if (internet.error != null) {
			isInternet = false;
		} else {
			isInternet = true;

I found that I had to use an actual image instead of just for the link otherwise it would falsely return true on android.