# Print output for @column tags ?> Characteristics - Android SDK | Android Developers

Most visited

Recently visited

Characteristics

public final class Characteristics
extends Object implements Parcelable

java.lang.Object
   ↳ android.net.wifi.aware.Characteristics


The characteristics of the Wi-Fi Aware implementation.

Summary

Constants

int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128

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

int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256

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

Inherited constants

Fields

public static final Creator<Characteristics> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

int getMaxMatchFilterLength()

Returns the maximum length of byte array that can be used to specify a Aware match filter.

int getMaxServiceNameLength()

Returns the maximum string length that can be used to specify a Aware service name.

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.

int getSupportedCipherSuites()

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

boolean isInstantCommunicationModeSupported()

Check if instant communication mode is supported by device.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

WIFI_AWARE_CIPHER_SUITE_NCS_SK_128

public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128

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

Constant Value: 1 (0x00000001)

WIFI_AWARE_CIPHER_SUITE_NCS_SK_256

public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256

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

Constant Value: 2 (0x00000002)

Fields

CREATOR

public static final Creator<Characteristics> CREATOR

Public methods

describeContents

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 writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getMaxMatchFilterLength

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 PublishConfig.Builder#setMatchFilter(java.util.List) and SubscribeConfig.Builder#setMatchFilter(java.util.List).

Returns
int A positive integer, maximum length of byte array for Aware discovery match filter.

getMaxServiceNameLength

public int getMaxServiceNameLength ()

Returns the maximum string length that can be used to specify a Aware service name. Restricts the parameters of the PublishConfig.Builder#setServiceName(String) and SubscribeConfig.Builder#setServiceName(String).

Returns
int A positive integer, maximum string length of Aware service name.

getMaxServiceSpecificInfoLength

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 PublishConfig.Builder#setServiceSpecificInfo(byte[]), SubscribeConfig.Builder#setServiceSpecificInfo(byte[]), and DiscoverySession#sendMessage(PeerHandle, int, byte[]) variants.

Returns
int A positive integer, maximum length of byte array for Aware messaging.

getSupportedCipherSuites

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.

Returns
int A set of flags from WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, or WIFI_AWARE_CIPHER_SUITE_NCS_SK_256. Value is either 0 or a combination of WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, and WIFI_AWARE_CIPHER_SUITE_NCS_SK_256

isInstantCommunicationModeSupported

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.

Returns
boolean True if supported, false otherwise.

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES