PhoneTypeHelper
public final class PhoneTypeHelper
Provides helper methods for determining the type of phone we are paired to.
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 |
DEVICE_TYPE_IOS = 2Indicates that we are paired to an iOS phone. |
static final int |
DEVICE_TYPE_NONE = 4Indicates that device is not paired to phone. |
static final int |
Indicates unknown type of phone we are paired to. |
Public methods |
|
|---|---|
static final int |
getPhoneDeviceType(@NonNull Context context)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 = 1
Indicates that we are paired to an Android phone.
DEVICE_TYPE_ERROR
public static final int DEVICE_TYPE_ERROR = 0
Indicates an error returned retrieving the type of phone we are paired to.
DEVICE_TYPE_IOS
public static final int DEVICE_TYPE_IOS = 2
Indicates that we are paired to an iOS phone.
DEVICE_TYPE_NONE
public static final int DEVICE_TYPE_NONE = 4
Indicates that device is not paired to phone.
DEVICE_TYPE_UNKNOWN
public static final int DEVICE_TYPE_UNKNOWN = 3
Indicates unknown type of phone we are paired to.
Public methods
getPhoneDeviceType
public static final int getPhoneDeviceType(@NonNull Context context)
Returns the type of phone handset this Wear OS device has been paired with.
| Returns | |
|---|---|
int |
one of |