title: How to test a project using wifi connection on Genymotion emulator?
body: <p>I try to test my project with wifi connection :
  I use genymotion emulator 4.2.2
  the emulator detect the wifi/3g connection but in my project i can't connect to the localhost </p>
  
  <pre><code>it is necessary to change the code or do any configuration on the emulator?
  </code></pre>
  
  <p>code :</p>
  
  <pre><code>public class ConnectionDetector {
      private Context _context;
  
      public ConnectionDetector(Context context){
          this._context = context;
  }
      /**
       * Checking for all possible internet providers
       * **/
      public boolean isConnectingToInternet(){
          ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);
            if (connectivity != null)
            {
                NetworkInfo[] info = connectivity.getAllNetworkInfo();
                if (info != null)
                    for (int i = 0; i &lt; info.length; i++)
                        if (info[i].getState() == NetworkInfo.State.CONNECTED)
                        {
                            return true;
                        }
  
            }
            return false;
      }
  }
  </code></pre>
  
  <p>in HomeFragment :</p>
  
  <pre><code>ConnectionDetector cd;
  // Check if Internet present
      if (!cd.isConnectingToInternet()) {
          // Internet Connection is not present
          alert.showAlertDialog(RegisterActivity.this,
                  "Internet Connection Error",
                  "Please connect to working Internet connection", false);
          // stop executing code by return
          return;
      }
  </code></pre>