Sidewalk

class Sidewalk(context: Context, authProvider: SidewalkAuthProvider, deregisterStrategy: DeregisterStrategy = DeregisterStrategy.DEFAULT)

Main entry point to the Amazon Sidewalk Mobile SDK.

Parameters

context

Android context

authProvider

Authentication token provider

deregisterStrategy

Configurable parameters for de-registration flow

Constructors

Link copied to clipboard
fun Sidewalk(context: Context, authProvider: SidewalkAuthProvider, deregisterStrategy: DeregisterStrategy = DeregisterStrategy.DEFAULT)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun clearAccountCache(): SidewalkResult<Unit>

Clear user related data, this method should be called explicitly by host app when the account credential is no longer available, like user logged out.

Link copied to clipboard
suspend fun deregister(sidewalkId: String, factoryReset: Boolean): SidewalkResult<Unit>

Note: This method is being deprecated in the near future, please use deregisterDevice(smsn, factoryReset) instead for simpler Amazon Sidewalk device management with consistent SMSN value.

Link copied to clipboard
suspend fun deregisterDevice(smsn: String, factoryReset: Boolean): SidewalkResult<Unit>

Deregister a device from the Amazon Sidewalk network.

Link copied to clipboard
fun register(sidewalkConnection: SidewalkConnection): Flow<RegisterResult>

Note: This method is being deprecated in the near future, please use registerDevice(sidewalkConnection) instead for simpler Amazon Sidewalk device management with consistent SMSN value.

Note: This method is being deprecated in the near future, please use registerDevice(smsn) instead for simpler Amazon Sidewalk device management with consistent SMSN value.

Link copied to clipboard

Register a device with the Amazon Sidewalk network through the BLE secure connection. Process returns directly if the device is already registered to your account; otherwise the Amazon Sidewalk device will disconnect after registration regardless of the result.

Register a device with the Amazon Sidewalk network. If a SidewalkConnection has been established with the device before registration, use registerDevice(SidewalkConnection) instead.

Authenticate existing devices already in the field onto Amazon Sidewalk network.

Link copied to clipboard

Starts scanning for Amazon Sidewalk devices via Bluetooth.

Link copied to clipboard

Note: This method is being deprecated in the near future, please use secureConnectDevice(smsn) instead for simpler Amazon Sidewalk device management with consistent SMSN value.

Link copied to clipboard

Securely connects to a given Amazon Sidewalk device.