# PhoneDeviceType

Summary:[Nested Classes](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType#nestedclasses)\|[Constants](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType#constants)\|[Ctors](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType#pubctors)\|[Methods](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType#inhmethods)  

# PhoneDeviceType

`
public

final

class
PhoneDeviceType
`  
`

extends `[Object](http://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|------------------------------------------------|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.wearable.phone.PhoneDeviceType |

<br />

*** ** * ** ***

<br />

**This class is deprecated.**   
Use`androidx.wear.phone.interactions.PhoneTypeHelper`from the[Jetpack Wear Phone Interactions](https://developer.android.com/jetpack/androidx/releases/wear)library instead.

Provides helper methods for determining the type of phone we are paired to.

## Summary

|                                                                                                                                                                        ### Nested classes                                                                                                                                                                         ||
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` @interface` | [PhoneDeviceType.DeviceType](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType.DeviceType.html) *This @interface is deprecated. Use`androidx.wear.phone.interactions.PhoneTypeHelper`from the[Jetpack Wear Phone Interactions](https://developer.android.com/jetpack/androidx/releases/wear)library instead.* |

|                                                                                                            ### Constants                                                                                                             ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [DEVICE_TYPE_ANDROID](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType.html#DEVICE_TYPE_ANDROID) Indicates that we are paired to an Android phone.                                      |
| `int` | [DEVICE_TYPE_ERROR_UNKNOWN](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType.html#DEVICE_TYPE_ERROR_UNKNOWN) Indicates an error returned retrieving the type of phone we are paired to. |
| `int` | [DEVICE_TYPE_IOS](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType.html#DEVICE_TYPE_IOS) Indicates that we are paired to an iOS phone.                                                  |

|                                                           ### Public constructors                                                           ||
|------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PhoneDeviceType](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType.html#PhoneDeviceType())`() ` |

|                                                                                                                                                                    ### Public methods                                                                                                                                                                    ||
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static int` | ` `[getPhoneDeviceType](https://developer.android.com/reference/android/support/wearable/phone/PhoneDeviceType.html#getPhoneDeviceType(android.content.Context))`(`[Context](http://developer.android.com/reference/android/content/Context.html)` context) ` Returns the type of phone handset this Wear OS device has been paired with. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                               | | ` boolean`                                                                         | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                            | ` finalize() `                                                                            | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                            | | ` int`                                                                             | ` hashCode() `                                                                            | | ` final void`                                                                      | ` notify() `                                                                              | | ` final void`                                                                      | ` notifyAll() `                                                                           | | ` `[String](http://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                            | | ` final void`                                                                      | ` wait(long arg0, int arg1) `                                                             | | ` final void`                                                                      | ` wait(long arg0) `                                                                       | | ` final void`                                                                      | ` wait() `                                                                                | ||

## Constants

### DEVICE_TYPE_ANDROID

```
public static final int DEVICE_TYPE_ANDROID
```

Indicates that we are paired to an Android phone.

<br />

Constant Value: 1 (0x00000001)  

### DEVICE_TYPE_ERROR_UNKNOWN

```
public static final int DEVICE_TYPE_ERROR_UNKNOWN
```

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

<br />

Constant Value: 0 (0x00000000)  

### DEVICE_TYPE_IOS

```
public static final int DEVICE_TYPE_IOS
```

Indicates that we are paired to an iOS phone.

<br />

Constant Value: 2 (0x00000002)

## Public constructors

### PhoneDeviceType

```
public PhoneDeviceType ()
```

<br />

<br />

## Public methods

### getPhoneDeviceType

```
public static int getPhoneDeviceType (Context context)
```

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

<br />

|         Parameters          ||
|-----------|------------------|
| `context` | `Context` <br /> |

|                                                                                                          Returns                                                                                                           ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | one of`DEVICE_TYPE_ERROR_UNKNOWN`,`DEVICE_TYPE_ANDROID`or`DEVICE_TYPE_IOS`indicating we could not determine the phone type, we are paired to an Android phone or we are paired to an iOS phone respectively. <br /> |