Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#constants) \| [Inherited Constants](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#inhconstants) \| [Fields](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#lfields) \| [Ctors](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#pubctors) \| [Methods](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#inhmethods)

# WifiP2pDevice

*** ** * ** ***


`
public


class
WifiP2pDevice
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.wifi.p2p.WifiP2pDevice |

<br />

*** ** * ** ***

A class representing a Wi-Fi p2p device

Note that the operations are not thread safe
**See also:**

- `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager`

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#AVAILABLE` |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#CONNECTED` |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#FAILED` |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#INVITED` |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#UNAVAILABLE` |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice>` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#CREATOR` Implement the Parcelable interface |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#deviceAddress` The device MAC address uniquely identifies a Wi-Fi p2p device |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#deviceName` The device name is a user friendly string to identify a Wi-Fi p2p device |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#primaryDeviceType` Primary device type identifies the type of device. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#secondaryDeviceType` Secondary device type is an optional attribute that can be provided by a device in addition to the primary device type. |
| ` public int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#status` Device connection status |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#WifiP2pDevice()() ` |
| ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#WifiP2pDevice(android.net.wifi.p2p.WifiP2pDevice)(https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice source) ` copy constructor |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#describeContents()() ` Implement the Parcelable interface |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/java/net/InetAddress` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#getIpAddress()() ` Get the IP address of the connected client device. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/ScanResult.InformationElement>` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#getVendorElements()() ` Get the vendor-specific information elements received as part of the discovery of the peer device. |
| ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#getWfdInfo()() ` The Wifi Display information for this device, or null if unavailable. |
| ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pConnectionInfo` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#getWifiP2pConnectionInfo()() ` Get the P2P connection info (See `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pConnectionInfo` of the connected client device if the device is a part of the group, otherwise null. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isGroupOwner()() ` Returns true if the device is a group owner |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isOpportunisticBootstrappingMethodSupported()() ` Returns true if opportunistic bootstrapping method is supported. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isPassphraseDisplayBootstrappingMethodSupported()() ` Returns true if passphrase display bootstrapping method is supported. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isPassphraseKeypadBootstrappingMethodSupported()() ` Returns true if passphrase keypad bootstrapping method is supported. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isPinCodeDisplayBootstrappingMethodSupported()() ` Returns true if pin-code display bootstrapping method is supported. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isPinCodeKeypadBootstrappingMethodSupported()() ` Returns true if pin-code keypad bootstrapping method is supported. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#isServiceDiscoveryCapable()() ` Returns true if the device is capable of service discovery |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#update(android.net.wifi.p2p.WifiP2pDevice)(https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice device) ` Update this device's details using another `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice` instance. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#wpsDisplaySupported()() ` Returns true if WPS display configuration is supported |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#wpsKeypadSupported()() ` Returns true if WPS keypad configuration is supported |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#wpsPbcSupported()() ` Returns true if WPS push button configuration is supported |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Implement the Parcelable interface |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### AVAILABLE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AVAILABLE
```

<br />

<br />

Constant Value:

3
(0x00000003)


### CONNECTED

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CONNECTED
```

<br />

<br />

Constant Value:

0
(0x00000000)


### FAILED

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FAILED
```

<br />

<br />

Constant Value:

2
(0x00000002)


### INVITED

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int INVITED
```

<br />

<br />

Constant Value:

1
(0x00000001)


### UNAVAILABLE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int UNAVAILABLE
```

<br />

<br />

Constant Value:

4
(0x00000004)


## Fields

### CREATOR

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<WifiP2pDevice> CREATOR
```

Implement the Parcelable interface

<br />

### deviceAddress

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String deviceAddress
```

The device MAC address uniquely identifies a Wi-Fi p2p device

<br />

### deviceName

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String deviceName
```

The device name is a user friendly string to identify a Wi-Fi p2p device

<br />

### primaryDeviceType

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String primaryDeviceType
```

Primary device type identifies the type of device. For example, an application
could filter the devices discovered to only display printers if the purpose is to
enable a printing action from the user. See the Wi-Fi Direct technical specification
for the full list of standard device types supported.

<br />

### secondaryDeviceType

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String secondaryDeviceType
```

Secondary device type is an optional attribute that can be provided by a device in
addition to the primary device type.

<br />

### status

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int status
```

Device connection status

<br />

## Public constructors

### WifiP2pDevice

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiP2pDevice ()
```

<br />

<br />

### WifiP2pDevice

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiP2pDevice (WifiP2pDevice source)
```

copy constructor

<br />

| Parameters ||
|---|---|
| `source` | `WifiP2pDevice` <br /> |

## Public methods

### describeContents

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Implement the Parcelable interface

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### equals

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object obj)
```

Indicates whether some other object is "equal to" this one.


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `obj` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getIpAddress

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InetAddress getIpAddress ()
```

Get the IP address of the connected client device.
The application should listen to `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION`
broadcast to obtain the IP address of the connected client. When system assigns the IP
address, the connected P2P device information (`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pGroup#getClientList()`) in the
group is updated with the IP address and broadcast the group information using
`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#EXTRA_WIFI_P2P_GROUP` extra of the
`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION` broadcast intent.

Alternatively, the application can request for the group details with
`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel,%20android.net.wifi.p2p.WifiP2pManager.GroupInfoListener)` and use (`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pGroup#getClientList()`) to
obtain the connected client details.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/net/InetAddress` | the IP address if the device is a part of the group; otherwise null. <br /> |

### getVendorElements

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<ScanResult.InformationElement> getVendorElements ()
```

Get the vendor-specific information elements received as part of the discovery
of the peer device.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/ScanResult.InformationElement>` | the list of vendor-specific information elements The information element format is defined in the IEEE 802.11-2016 spec Table 9-77. This value cannot be `null`. <br /> |

### getWfdInfo

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiP2pWfdInfo getWfdInfo ()
```

The Wifi Display information for this device, or null if unavailable.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo` | <br /> |

### getWifiP2pConnectionInfo

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiP2pConnectionInfo getWifiP2pConnectionInfo ()
```

Get the P2P connection info (See `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pConnectionInfo` of the connected client
device if the device is a part of the group, otherwise null.


The application should listen to `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION`
broadcast to obtain the connection info of the connected client. When the client gets
connected to the Group Owner, the connected P2P device information
(`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pGroup#getClientList()`) in the group is updated with the connection
information and broadcast the group information using
`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#EXTRA_WIFI_P2P_GROUP` extra of the
`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION` broadcast intent.

Alternatively, the application can request for the group details with
`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel,%20android.net.wifi.p2p.WifiP2pManager.GroupInfoListener)` and use (`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pGroup#getClientList()`) to
obtain the connected client details.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pConnectionInfo` | the p2p connection info if the device is a part of the group, otherwise null. <br /> |

### hashCode

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isGroupOwner

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isGroupOwner ()
```

Returns true if the device is a group owner

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isOpportunisticBootstrappingMethodSupported

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isOpportunisticBootstrappingMethodSupported ()
```

Returns true if opportunistic bootstrapping method is supported.
Defined in Wi-Fi Alliance Wi-Fi Direct R2 Specification Table 10 - Bootstrapping Methods.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isPassphraseDisplayBootstrappingMethodSupported

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPassphraseDisplayBootstrappingMethodSupported ()
```

Returns true if passphrase display bootstrapping method is supported.
Defined in Wi-Fi Alliance Wi-Fi Direct R2 Specification Table 10 - Bootstrapping Methods.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isPassphraseKeypadBootstrappingMethodSupported

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPassphraseKeypadBootstrappingMethodSupported ()
```

Returns true if passphrase keypad bootstrapping method is supported.
Defined in Wi-Fi Alliance Wi-Fi Direct R2 Specification Table 10 - Bootstrapping Methods.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isPinCodeDisplayBootstrappingMethodSupported

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPinCodeDisplayBootstrappingMethodSupported ()
```

Returns true if pin-code display bootstrapping method is supported.
Defined in Wi-Fi Alliance Wi-Fi Direct R2 Specification Table 10 - Bootstrapping Methods.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isPinCodeKeypadBootstrappingMethodSupported

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPinCodeKeypadBootstrappingMethodSupported ()
```

Returns true if pin-code keypad bootstrapping method is supported.
Defined in Wi-Fi Alliance Wi-Fi Direct R2 Specification Table 10 - Bootstrapping Methods.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isServiceDiscoveryCapable

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isServiceDiscoveryCapable ()
```

Returns true if the device is capable of service discovery

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### toString

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### update

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void update (WifiP2pDevice device)
```

Update this device's details using another `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice` instance.
This will throw an exception if the device address does not match.

<br />

| Parameters ||
|---|---|
| `device` | `WifiP2pDevice`: another instance of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice` used to update this instance. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the device is null or the device address does not match |

### wpsDisplaySupported

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean wpsDisplaySupported ()
```

Returns true if WPS display configuration is supported

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### wpsKeypadSupported

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean wpsKeypadSupported ()
```

Returns true if WPS keypad configuration is supported

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### wpsPbcSupported

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean wpsPbcSupported ()
```

Returns true if WPS push button configuration is supported

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### writeToParcel

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Implement the Parcelable interface

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |