I need to configure a hardware device that I am developing to be on a Wifi network. It has Wifi (embedded linux), and I want to have a setup application on Android, almost exactly like the GoogleCast app (https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app)
When configuring the device, the Google Cast app has a screen where it asks if it can supply the Wifi password from my Android device, or if I want to supply it manually. It would be really beneficial for my device to be able to be configured that way so the user does not need to remember or manually enter the Wifi password. The Google Cast app seems to use the following permissions:
- android.permission.ACCESS_NETWORK_STATE
- android.permission.ACCESS_WIFI_STATE
- android.permission.CHANGE_NETWORK_STATE
- android.permission.CHANGE_WIFI_STATE
- android.permission.GET_ACCOUNTS
- android.permission.MANAGE_ACCOUNTS
- android.permission.INTERNET
- android.permission.READ_PHONE_STATE
- android.permission.RECEIVE_BOOT_COMPLETED
- android.permission.ACCESS_FINE_LOCATION
- android.permission.BLUETOOTH
- android.permission.BLUETOOTH_ADMIN
- com.google.android.providers.gsf.permission.READ_GSERVICES
To be be clear, I do not care if I ever see or hold in memory the Wifi password. If I can push an opaque message to the device being configured on how to connect to the network, that would also suffice. But I think that's a long shot (I'd probably have ti implement Android on the device, but that's a whole other can of worms. So I'd like to know what APIs I can use to get the password?
I did some research and found one that would only ever return me "", but that won't work either (unless the password is "", which I probably won't be)