createLocatorWithIdentifier
fun createLocatorWithIdentifier(presenceIdentifier: ByteArray, payload: String? = null, callback: (PresenceLocator?, SdkError?) -> Unit)
Create a locator with a presenceIdentifier.
The application should provide a unique Presence Level® identifier (presenceIdentifier) to create a PresenceLocator. A PresenceLocator is a Bluetooth advertisement that can transmit information to the Flybuy Gateway from a mobile device in a specific spot.
To receive updates from the PresenceLocator (e.g. starting, stopping, and state updates), set the LocatorListener for the locator after it is created (as shown below).
Example:
PresenceManager.getInstance()?.createLocatorWithIdentifier(presenceId, payload) { presenceLocator, sdkError ->
sdkError?.let {
// Handle error
}
presenceLocator?.let {
// Set locator listener
it.listener = locatorListener
// Store locator or start it here
}
}Content copied to clipboard