title: Android 5.0 Lollipop and 4.4 KitKat ignores my WiFi network, enableNetwork() is useless
body: <p>My app <strong>connect directly to a hardware device</strong> that act as an access point (with no access to internet). </p>
  
  <p>I can't connect because Android 5.0 automaticcaly switch to a valid internet connection, so if I have data connection (3G, 4G, ...) or a pre-configured network I can't connect to my device because it ignores the WiFi.</p>
  
  <p>So how can I force Android to use the network I activated programatically?</p>
  
  <p>I'm simply using:</p>
  
  <pre><code>wifiManager.enableNetwork(id, true))
  </code></pre>
  
  <p>where <code>id</code> is the network of my device I want to connect to. The <code>true</code> parameter is useless.</p>
  
  <p>The suggested solution that use <code>ConnectivityManager.requestNetwork()</code> has no effect.</p>