How to turn wifi on in android?

Hi,
I could not turn the wifi on after turning the airplane mode on:
Steps :

  • login.

  • Switch the airplane on using :

      NetworkConnectionSetting connection = new NetworkConnectionSetting(true, false, false);
      getDriver().setNetworkConnection(connection);
    
  • Do something.

  • Switch wifi on using :

      NetworkConnectionSetting connection = new NetworkConnectionSetting(false, true, false);
      getDriver().setNetworkConnection(connection); 
    

It does not work :frowning: