Google Home like WiFi remote configuration for an headless Android device

Google Home like WiFi remote configuration for an headless Android device

Using Android Nearby API, the discoverer and the advertiser communicate without the need to be on the same network using a combination of Wifi hotspots and Bluetooth. d( , ” to connect to $deviceName”) you can show a list with all the devices available ‘s assume we want to configure the first one discovered } override fun onConnected() { . you can show a list with all the network available that are stored in results ‘s take the first discovered network for semplicity val chosenAccessPoint results[ ] chosenAccessPoint.password If the network doesn’t have a protection, leave the password filed empty Then call sendWifiCredentials to send data back to the advertiser { override fun onError(e ) { .

Source: github.com