Android.Companion Namespace

Provides APIs to find, associate, and manage companion devices.

Classes

Name Description
ActionRequest

Represents a request for a companion app to perform a specific action.

ActionRequest.Builder

A builder for creating ActionRequest.

ActionRequest.InterfaceConsts

Exposes constants from the Java interfaces implemented by ActionRequest.

ActionResult

A result reported by a companion app in response to an ActionRequest.

ActionResult.Builder

Builder for creating an ActionResult.

ActionResult.InterfaceConsts

Exposes constants from the Java interfaces implemented by ActionResult.

AssociatedDevice

Container for device info from an association that is not self-managed.

AssociatedDevice.InterfaceConsts

Exposes constants from the Java interfaces implemented by AssociatedDevice.

AssociationInfo

Details for a specific "association" that has been established between an app and companion device.

AssociationInfo.InterfaceConsts

Exposes constants from the Java interfaces implemented by AssociationInfo.

AssociationRequest

A request for the user to select a companion device to associate with.

AssociationRequest.Builder

A builder for AssociationRequest

AssociationRequest.InterfaceConsts

Exposes constants from the Java interfaces implemented by AssociationRequest.

BluetoothDeviceFilter

A filter for Bluetooth(non-LE) devices

BluetoothDeviceFilter.Builder

A builder for BluetoothDeviceFilter

BluetoothLeDeviceFilter

A filter for Bluetooth LE devices

BluetoothLeDeviceFilter.Builder

Builder for BluetoothLeDeviceFilter

CompanionDeviceManager

Public interfaces for managing companion devices.

CompanionDeviceManager.Callback

Callback for applications to receive updates about and the outcome of AssociationRequest issued via associate() call.

CompanionDeviceManager.TrustPairingCallback

Callback for applications to receive updates about and the outcome of #requestDeviceTrustPairing

CompanionDeviceService

A service that receives calls from the system with device events.

CompanionException

CompanionException can be thrown during the companion system data transfer process.

DeviceId

A device id represents a device identifier managed by the companion app.

DeviceId.Builder

A builder for DeviceId

DeviceId.InterfaceConsts

Exposes constants from the Java interfaces implemented by DeviceId.

DeviceNotAssociatedException

An exception for a case when a given device was not CompanionDeviceManager#associate associated to the calling app.

DevicePresenceEvent

Event for observing device presence.

DevicePresenceEvent.InterfaceConsts

Exposes constants from the Java interfaces implemented by DevicePresenceEvent.

ObservingDevicePresenceRequest

A request for setting the types of device for observing device presence.

ObservingDevicePresenceRequest.Builder

A builder for ObservingDevicePresenceRequest

ObservingDevicePresenceRequest.InterfaceConsts

Exposes constants from the Java interfaces implemented by ObservingDevicePresenceRequest.

OutOfBandPairingRequest

Represents a request for out-of-band pairing.

OutOfBandPairingRequest.Builder

A builder for creating OutOfBandPairingRequest.

OutOfBandPairingRequest.InterfaceConsts

Exposes constants from the Java interfaces implemented by OutOfBandPairingRequest.

WifiDeviceFilter

A filter for Wifi devices

WifiDeviceFilter.Builder

A builder for WifiDeviceFilter

Interfaces

Name Description
IDeviceFilter

A filter for companion devices of type D

Enums

Name Description
CompanionDeviceManagerTrustErrorCode

Identifies the reason that a device trust pairing request failed.

CompanionDeviceManagerTrustType

Identifies the kinds of trust that a device trust pairing request can enable.

CompanionDeviceResult

Identifies the result of an association request.

DevicePresenceEventType

Identifies a device presence event.

RequestAction

Identifies the action that the system requests from a companion app.

RequestOperation

Identifies whether the system requests to activate or deactivate an action.

ResultCode

Identifies the result that a companion app reports for a requested action.

SystemDataSyncFlags

Identifies the types of system data that an association can synchronize.

Remarks

Use CompanionDeviceManager to request associations with companion devices, and use CompanionDeviceService to receive device events from the system. See the Android package reference for the corresponding Java APIs and their availability and deprecation notices.