title: Wifi Connect-Disconnect Listener
body: <p>Which listener does my class have to implement inorder to automatically check code if the wifi connects/disconnects? </p>
  
  <p>I'm able to manually check for wifi connection/disconnection but each time I need to connect/disconnect WIFI from android settings and then run my program for the result.</p>
  
  <p>My current code is as simple as:</p>
  
  <pre><code>WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
  if (wifi.isWifiEnabled()==true)
  {
      tv.setText("You are connected");
  }
  else
  {
      tv.setText("You are NOT connected");
  }
  </code></pre>