Package com.codename1.nearby.companion
package com.codename1.nearby.companion
Companion-device association: telling the operating system which accessory is yours, and getting privileges back for it.
Start at CompanionDevices, which explains what association buys that an
ordinary Bluetooth scan does not -- OS-run presence watching, scanning
without location permission, and one honest consent prompt naming one
device.
An association is a durable relationship: it survives app restarts and
reboots, and ends only when the app drops it, the user revokes it in
system settings, or the app is uninstalled. Persist
CompanionDevice.getId() and look the device up again on the next
launch instead of asking the user to pick it twice.
-
ClassDescriptionWhat to show the user in the system device chooser, built with
AssociationRequest.Builder.Assembles anAssociationRequest.A device this app is associated with.Companion-device association: the OS-managed relationship between this app and one particular accessory.What kind of thing is being associated.Narrows what the system device chooser offers the user.Told when an associated device comes into or goes out of range.