headlesswifimanager / com.wideverse.headlesswifimanager / HeadlessWifiManager

HeadlessWifiManager

class HeadlessWifiManager

Types

ScanResultListener

interface ScanResultListener

Populates a list of WiFi ScanResults trough system's WifiManager

Constructors

<init>

HeadlessWifiManager(applicationContext: Context, appID: String)

Main constructor for HeadlessWifiManager.

Properties

advertisingCallback

lateinit var advertisingCallback: AdvertisingCallback

appID

var appID: String

currentConnectedEndpointId

var currentConnectedEndpointId: String?

discoveryCallback

lateinit var discoveryCallback: DiscoveryCallback

networkCallback

lateinit var networkCallback: NetworkCallback

Functions

abortProcedure

fun abortProcedure(): Unit

Closes the current connection and stops discovery

connectToEndpoint

fun connectToEndpoint(endpointId: String): Unit

Connects the discoverer to a specific advertiser.

sendWifiCredentials

fun sendWifiCredentials(chosenOne: WifiScanResult, callback: NetworkCallback): Unit

Sends WiFi credentials from Advertiser to Discoverer

startAdvertising

fun startAdvertising(callback: AdvertisingCallback): Unit

Starts advertising Called on the advertiser that awaits configuration

startDiscovery

fun startDiscovery(callback: DiscoveryCallback): Unit

Starts searching for advertisers Called on the phone to configure the advertiser