Presence
#
Set up and Initialize SDKThe Flybuy SDK must be initialized when the application starts in order to configure the app authorization token and handle appropriate lifecycle methods.
Important: Complete all steps in the Android and iOS Setup guides.
#
Module Installation#
Native Initialization#
AndroidModify android/app/build.gradle
Modify MainApplication.kt
#
iOSModify iOS/yourproject/AppDelegate.mm
#
Bluetooth PermissionsFlybuy Presence uses Bluetooth on the mobile device to send locate and send order information to the store. iOS requires additional permissions for this. Refer to the Setting Permissions section of the setup guides for iOS for details. If the app already asks for Bluetooth permissions for other purposes, this may not be necessary.
#
Start a LocatorCreate and start a Presence Locator. A Presence Locator is a Bluetooth advertisement that can transmit information to the Flybuy Gateway from a mobile device in a specific spot.
#
ParamsName | Type | Example |
---|---|---|
presenceId | Str | '12345678' |
payload | Str | "{'key':'value'}" |
#
Example#
Stop a LocatorStop the Presence Locator when the transaction is complete.
#
ParamsName | Type |
---|---|
None | None |
#
Example#
Android Service NotificationWhen there is an active locator, the Flybuy SDK runs a foreground service for broadcasting the locator. Foreground services on Android require a notification while it is running, To override the default values of notification title, content, and icon, please refer to Android Service Notification Docs.