Android setup library fails to connect to hidden network with no password

I am connecting my photons to a hidden network with no password. When using the Android Device Setup library, I have to use the option for entering the network name mannually. This cause the app to crush due to an unhandled NullPointerException. Taking a look at the code, it seems that the app still tries to encrypt and encode an unexisting password with the following function Crypto.encryptAndEncodeToHex(networkSecretPlaintext, publicKey));
It seems that the checkbox used to tell if the network has password isnt properly read, because although having it unchecked, it will enter the conditional if (wifiSecurity != WifiSecurity.OPEN).

Steps to reproduce

  1. Configure a hidden wifi network with no password
  2. Try to setup the photon from the android setup library
  3. When selecting the wifi network, hit MANUAL NETWORK NAME
  4. Introduce wifi network name and uncheck “Network requires password” checkbox
  5. hit CONNECT.
    The app will crush at this point

You are correct, it is a bug. Thank you for reporting it.

Fix will be included in next release build.