PhoneTypeHelper.Companion

object PhoneTypeHelper.Companion


Summary

Constants

static final int

Indicates that we are paired to an Android phone.

static final int

Indicates an error returned retrieving the type of phone we are paired to.

static final int

Indicates that we are paired to an iOS phone.

static final int

Indicates unknown type of phone we are paired to.

Public methods

final @PhoneTypeHelper.Companion.DeviceFamily int

Returns the type of phone handset this Wear OS device has been paired with.

Constants

DEVICE_TYPE_ANDROID

public static final int DEVICE_TYPE_ANDROID

Indicates that we are paired to an Android phone.

DEVICE_TYPE_ERROR

public static final int DEVICE_TYPE_ERROR

Indicates an error returned retrieving the type of phone we are paired to.

DEVICE_TYPE_IOS

public static final int DEVICE_TYPE_IOS

Indicates that we are paired to an iOS phone.

DEVICE_TYPE_UNKNOWN

public static final int DEVICE_TYPE_UNKNOWN

Indicates unknown type of phone we are paired to.

Public methods

getPhoneDeviceType

@PhoneTypeHelper.Companion.DeviceFamily
public final int getPhoneDeviceType(@NonNull Context context)

Returns the type of phone handset this Wear OS device has been paired with.

Returns
int

one of DEVICE_TYPE_ERROR, DEVICE_TYPE_ANDROID, DEVICE_TYPE_IOS or DEVICE_TYPE_UNKNOWN indicating we had an error while determining the phone type, we are paired to an Android phone, we are paired to an iOS phone or we could not determine the phone type respectively.