public enum CompanionProfile

  1. Object
  2. Enum<CompanionProfile>
  3. CompanionProfile

ImplementsComparable<CompanionProfile>

What kind of thing is being associated.

The profile is a request for elevated privileges as much as a description: Android grants a watch profile the right to run in the background and stream notifications, and shows the user a correspondingly stronger consent dialog. Ask for GENERIC unless the device really is one of the specific kinds, because the specific profiles cost the user a scarier prompt.

Enum constants

GENERICNo elevated privileges.
WATCHA watch.
GLASSESA head-mounted display.
COMPUTERA nearby computer, for cross-device flows.

Methods

public static CompanionProfile[] values()
public static CompanionProfile valueOf(String name)

Inherited methods

Enum constant details

GENERIC

GENERIC
No elevated privileges. The right answer for a sensor, a tag, a fitness accessory – anything that is not one of the categories the platform treats specially.

WATCH

WATCH
A watch. On Android this is DEVICE_PROFILE_WATCH, which carries background and notification privileges.

GLASSES

GLASSES
A head-mounted display. Android DEVICE_PROFILE_GLASSES.

COMPUTER

COMPUTER
A nearby computer, for cross-device flows. Android DEVICE_PROFILE_COMPUTER.

Method details

values

public static CompanionProfile[] values()

valueOf

public static CompanionProfile valueOf(String name)