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

# Characteristics

*** ** * ** ***


`
public

final

class
Characteristics
`


`

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.aware.Characteristics |

<br />

*** ** * ** ***

The characteristics of the Wi-Fi Aware implementation.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128` Wi-Fi Aware supported cipher suite representing NCS PK 2WDH 128: 128 bit public-key. |
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256` Wi-Fi Aware supported cipher suite representing NCS 2WDH 256: 256 bit public-key. |
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128` Wi-Fi Aware supported cipher suite representing NCS PASN 128: 128 bit public-key. |
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256` Wi-Fi Aware supported cipher suite representing NCS PASN 256: 256 bit public-key. |
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128` Wi-Fi Aware supported cipher suite representing NCS SK 128: 128 bit shared-key. |
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256` Wi-Fi Aware supported cipher suite representing NCS SK 256: 256 bit shared-key. |
| `int` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NONE` Wi-Fi Aware supported open (unencrypted) data-path. |

### 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/aware/Characteristics>` | `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#CREATOR` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getMaxMatchFilterLength()() ` Returns the maximum length of byte array that can be used to specify a Aware match filter. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getMaxServiceNameLength()() ` Returns the maximum string length that can be used to specify a Aware service name. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getMaxServiceSpecificInfoLength()() ` Returns the maximum length of byte array that can be used to specify a Aware service specific information field: the arbitrary load used in discovery or the message length of Aware message exchange. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getNumberOfSupportedDataInterfaces()() ` Returns the maximum number of Aware data interfaces supported by the device. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getNumberOfSupportedDataPaths()() ` Returns the maximum number of Aware data paths(also known as NDPs - NAN Data Paths) supported by the device. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getNumberOfSupportedPublishSessions()() ` Returns the maximum number of Aware publish sessions supported by the device. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getNumberOfSupportedSubscribeSessions()() ` Returns the maximum number of Aware subscribe session supported by the device. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getSupportedCipherSuites()() ` Returns the set of cipher suites supported by the device for use in Wi-Fi Aware data-paths. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getSupportedOffloadBootstrappingMethods()() ` Returns the supported bootstrapping methods for framework offloaded auto-pairing. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#getSupportedPairingCipherSuites()() ` Returns the set of cipher suites supported by the device for use in Wi-Fi Aware pairing. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#isAwarePairingSupported()() ` Check if the Aware Pairing and all associated security features as defined in Wi-Fi Alliance (WFA) Wi-Fi Aware Specification version 4.0 are supported. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#isInstantCommunicationModeSupported()() ` Check if instant communication mode is supported by device. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#isSuspensionSupported()() ` Check if Aware Suspension is supported. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/aware/Characteristics#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

### 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

### WIFI_AWARE_CIPHER_SUITE_NCS_PK_128

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_128
```

Wi-Fi Aware supported cipher suite representing NCS PK 2WDH 128: 128 bit public-key.

<br />

Constant Value:

4
(0x00000004)


### WIFI_AWARE_CIPHER_SUITE_NCS_PK_256

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_256
```

Wi-Fi Aware supported cipher suite representing NCS 2WDH 256: 256 bit public-key.

<br />

Constant Value:

8
(0x00000008)


### WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128
```

Wi-Fi Aware supported cipher suite representing NCS PASN 128: 128 bit public-key.

<br />

Constant Value:

16
(0x00000010)


### WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256
```

Wi-Fi Aware supported cipher suite representing NCS PASN 256: 256 bit public-key.

<br />

Constant Value:

32
(0x00000020)


### WIFI_AWARE_CIPHER_SUITE_NCS_SK_128

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128
```

Wi-Fi Aware supported cipher suite representing NCS SK 128: 128 bit shared-key.

<br />

Constant Value:

1
(0x00000001)


### WIFI_AWARE_CIPHER_SUITE_NCS_SK_256

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256
```

Wi-Fi Aware supported cipher suite representing NCS SK 256: 256 bit shared-key.

<br />

Constant Value:

2
(0x00000002)


### WIFI_AWARE_CIPHER_SUITE_NONE

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

```
public static final int WIFI_AWARE_CIPHER_SUITE_NONE
```

Wi-Fi Aware supported open (unencrypted) data-path.

<br />

Constant Value:

0
(0x00000000)


## Fields

### CREATOR

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

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

<br />

<br />

## Public methods

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<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` |

### getMaxMatchFilterLength

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

```
public int getMaxMatchFilterLength ()
```

Returns the maximum length of byte array that can be used to specify a Aware match filter.
Restricts the parameters of the
`https://developer.android.com/reference/android/net/wifi/aware/PublishConfig.Builder#setMatchFilter(java.util.List<byte[]>)` and
`https://developer.android.com/reference/android/net/wifi/aware/SubscribeConfig.Builder#setMatchFilter(java.util.List<byte[]>)`.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum length of byte array for Aware discovery match filter. <br /> |

### getMaxServiceNameLength

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

```
public int getMaxServiceNameLength ()
```

Returns the maximum string length that can be used to specify a Aware service name. Restricts
the parameters of the `https://developer.android.com/reference/android/net/wifi/aware/PublishConfig.Builder#setServiceName(java.lang.String)` and
`https://developer.android.com/reference/android/net/wifi/aware/SubscribeConfig.Builder#setServiceName(java.lang.String)`.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum string length of Aware service name. <br /> |

### getMaxServiceSpecificInfoLength

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

```
public int getMaxServiceSpecificInfoLength ()
```

Returns the maximum length of byte array that can be used to specify a Aware service specific
information field: the arbitrary load used in discovery or the message length of Aware
message exchange. Restricts the parameters of the
`https://developer.android.com/reference/android/net/wifi/aware/PublishConfig.Builder#setServiceSpecificInfo(byte[])`,
`https://developer.android.com/reference/android/net/wifi/aware/SubscribeConfig.Builder#setServiceSpecificInfo(byte[])`, and
`https://developer.android.com/reference/android/net/wifi/aware/DiscoverySession#sendMessage(android.net.wifi.aware.PeerHandle,%20int,%20byte[])`
variants.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum length of byte array for Aware messaging. <br /> |

### getNumberOfSupportedDataInterfaces

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

```
public int getNumberOfSupportedDataInterfaces ()
```

Returns the maximum number of Aware data interfaces supported by the device.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum number of Aware data interfaces supported by the device. Value is 1 or greater <br /> |

### getNumberOfSupportedDataPaths

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

```
public int getNumberOfSupportedDataPaths ()
```

Returns the maximum number of Aware data paths(also known as NDPs - NAN Data Paths) supported
by the device.
Use `https://developer.android.com/reference/android/net/wifi/aware/AwareResources#getAvailableDataPathsCount()` to get the number of available Aware
data paths which are not currently used by any app.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum number of Aware data paths supported by the device. Value is 1 or greater <br /> |

### getNumberOfSupportedPublishSessions

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

```
public int getNumberOfSupportedPublishSessions ()
```

Returns the maximum number of Aware publish sessions supported by the device.
Use `https://developer.android.com/reference/android/net/wifi/aware/AwareResources#getAvailablePublishSessionsCount()` to get the number of available
publish sessions which are not currently used by any app.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum number of publish sessions supported by the device. Value is 1 or greater <br /> |

### getNumberOfSupportedSubscribeSessions

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

```
public int getNumberOfSupportedSubscribeSessions ()
```

Returns the maximum number of Aware subscribe session supported by the device.
Use `https://developer.android.com/reference/android/net/wifi/aware/AwareResources#getAvailableSubscribeSessionsCount()` to get the number of
available subscribe sessions which are not currently used by any app.

<br />

| Returns ||
|---|---|
| `int` | A positive integer, maximum number of subscribe sessions supported by the device. Value is 1 or greater <br /> |

### getSupportedCipherSuites

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

```
public int getSupportedCipherSuites ()
```

Returns the set of cipher suites supported by the device for use in Wi-Fi Aware data-paths.
The device automatically picks the strongest cipher suite when initiating a data-path setup.

<br />

| Returns ||
|---|---|
| `int` | A set of flags from `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128`, `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256`, `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128`, or `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256` Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NONE` - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128` - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256` - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128` - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256` |

### getSupportedOffloadBootstrappingMethods

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int getSupportedOffloadBootstrappingMethods ()
```

Returns the supported bootstrapping methods for framework offloaded auto-pairing. Returns a
combination of the `PAIRING_BOOTSTRAPPING_*` bitmask constants from `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig`.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PIN_CODE_DISPLAY` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PASSPHRASE_DISPLAY` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PIN_CODE_KEYPAD` - `https://developer.android.com/reference/android/net/wifi/aware/AwarePairingConfig#PAIRING_BOOTSTRAPPING_PASSPHRASE_KEYPAD` |

### getSupportedPairingCipherSuites

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

```
public int getSupportedPairingCipherSuites ()
```

Returns the set of cipher suites supported by the device for use in Wi-Fi Aware pairing.

<br />

| Returns ||
|---|---|
| `int` | A set of flags from `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256`, or `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256` Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128` - `https://developer.android.com/reference/android/net/wifi/aware/Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256` |

### isAwarePairingSupported

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

```
public boolean isAwarePairingSupported ()
```

Check if the Aware Pairing and all associated security features as defined in Wi-Fi Alliance
(WFA) Wi-Fi Aware Specification version 4.0 are supported.
This includes:

1. NAN Pairing (as in Wi-Fi Aware Specification Version 4.0 section 7.6) with NIK caching
2. NDP unicast data frame encryption (as in Wi-Fi Aware Specification Version 4.0 section 7.3.1)
3. Group addressed data frame encryption (as in Wi-Fi Aware Specification Version 4.0 section 7.3.3)
4. Management frame protection (as in Wi-Fi Aware Specification Version 4.0 section 7.3.2 for both unicast and multicast frames)
5. Beacon integrity protection (as in Wi-Fi Aware Specification Version 4.0 section 7.3.4)

<br />

<br />

| Returns ||
|---|---|
| `boolean` | True if supported, false otherwise. <br /> |

### isInstantCommunicationModeSupported

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

```
public boolean isInstantCommunicationModeSupported ()
```

Check if instant communication mode is supported by device. The instant communication mode is
defined as per Wi-Fi Alliance (WFA) Wi-Fi Aware specifications version 3.1 Section 12.3.

<br />

| Returns ||
|---|---|
| `boolean` | True if supported, false otherwise. <br /> |

### isSuspensionSupported

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

```
public boolean isSuspensionSupported ()
```

Check if Aware Suspension is supported. Aware Suspension is a mechanism of putting an Aware
connection in and out of a low-power mode while preserving the discovery sessions and data
paths.

<br />

| Returns ||
|---|---|
| `boolean` | True if supported, false otherwise. <br /> |

### writeToParcel

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

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

Flatten this object in to a Parcel.

<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` |