Joins ssid. password may be null or empty for an open network. The call returns at once; a failure arrives through onChanged and status.
ssid
password
when ssid is null or empty
when the adapter has no Wi-Fi
if the permission is not granted