class HeadlessWifiManager
interface ScanResultListener
Populates a list of WiFi ScanResults trough system's WifiManager |
HeadlessWifiManager(applicationContext: Context, appID: String)
Main constructor for HeadlessWifiManager. |
lateinit var advertisingCallback: AdvertisingCallback |
|
var appID: String |
|
var currentConnectedEndpointId: String? |
|
lateinit var discoveryCallback: DiscoveryCallback |
|
lateinit var networkCallback: NetworkCallback |
fun abortProcedure(): Unit
Closes the current connection and stops discovery |
|
fun connectToEndpoint(endpointId: String): Unit
Connects the discoverer to a specific advertiser. |
|
fun sendWifiCredentials(chosenOne: WifiScanResult, callback: NetworkCallback): Unit
Sends WiFi credentials from Advertiser to Discoverer |
|
fun startAdvertising(callback: AdvertisingCallback): Unit
Starts advertising Called on the advertiser that awaits configuration |
|
fun startDiscovery(callback: DiscoveryCallback): Unit
Starts searching for advertisers Called on the phone to configure the advertiser |