Interface PolarCompanionDeviceManager.AssociationCallback
-
- All Implemented Interfaces:
public interface PolarCompanionDeviceManager.AssociationCallbackCallback for the outcome of an association request created with buildAssociationRequest.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonAssociationPending(IntentSender intentSender)Called when the system needs user confirmation. UnitonAssociationCreated(String macAddress)Called (API 33+ only) once the device is directly associated without needing user interaction (single device match with high confidence). abstract UnitonFailure(String error)Called if the association attempt failed. -
-
Method Detail
-
onAssociationPending
abstract Unit onAssociationPending(IntentSender intentSender)
Called when the system needs user confirmation. The caller (Activity) must launch this IntentSender, e.g. via
ActivityResultLauncher<IntentSenderRequest>orstartIntentSenderForResult, and on a positive result call onAssociationCreated with the address obtained from the resulting Intent (extra CompanionDeviceManager.EXTRA_DEVICE or android.companion.AssociationInfo on API 33+).
-
onAssociationCreated
Unit onAssociationCreated(String macAddress)
Called (API 33+ only) once the device is directly associated without needing user interaction (single device match with high confidence).
-
-
-
-