Added in API level 26

Characteristics


class Characteristics : Parcelable
kotlin.Any
   ↳ android.net.wifi.aware.Characteristics

The characteristics of the Wi-Fi Aware implementation.

Summary

Constants
static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

Inherited constants
Public methods
Int

Int

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

Int

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

Int

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

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

Int

Returns the maximum number of Aware data paths(also known as NDPs - NAN Data Paths) supported by the device.

Int

Returns the maximum number of Aware publish sessions supported by the device.

Int

Returns the maximum number of Aware subscribe session supported by the device.

Int

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

Int

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

Boolean

Check if the Aware Pairing is supported.

Boolean

Check if instant communication mode is supported by device.

Boolean

Check if Aware Suspension is supported.

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<Characteristics!>

Constants

WIFI_AWARE_CIPHER_SUITE_NCS_PK_128

Added in API level 33
static val WIFI_AWARE_CIPHER_SUITE_NCS_PK_128: Int

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

Value: 4

WIFI_AWARE_CIPHER_SUITE_NCS_PK_256

Added in API level 33
static val WIFI_AWARE_CIPHER_SUITE_NCS_PK_256: Int

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

Value: 8

WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128

Added in API level 34
static val WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128: Int

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

Value: 16

WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256

Added in API level 34
static val WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256: Int

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

Value: 32

WIFI_AWARE_CIPHER_SUITE_NCS_SK_128

Added in API level 30
static val WIFI_AWARE_CIPHER_SUITE_NCS_SK_128: Int

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

Value: 1

WIFI_AWARE_CIPHER_SUITE_NCS_SK_256

Added in API level 30
static val WIFI_AWARE_CIPHER_SUITE_NCS_SK_256: Int

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

Value: 2

WIFI_AWARE_CIPHER_SUITE_NONE

Added in API level 33
static val WIFI_AWARE_CIPHER_SUITE_NONE: Int

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

Value: 0

Public methods

describeContents

Added in API level 26
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getMaxMatchFilterLength

Added in API level 26
fun getMaxMatchFilterLength(): Int

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).

Return
Int A positive integer, maximum length of byte array for Aware discovery match filter.

getMaxServiceNameLength

Added in API level 26
fun getMaxServiceNameLength(): Int

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).

Return
Int A positive integer, maximum string length of Aware service name.

getMaxServiceSpecificInfoLength

Added in API level 26
fun getMaxServiceSpecificInfoLength(): Int

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.

Return
Int A positive integer, maximum length of byte array for Aware messaging.

getNumberOfSupportedDataInterfaces

Added in API level 33
fun getNumberOfSupportedDataInterfaces(): Int

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

Return
Int A positive integer, maximum number of Aware data interfaces supported by the device. Value is 1 or greater

getNumberOfSupportedDataPaths

Added in API level 33
fun getNumberOfSupportedDataPaths(): Int

Returns the maximum number of Aware data paths(also known as NDPs - NAN Data Paths) supported by the device. Use AwareResources.getAvailableDataPathsCount() to get the number of available Aware data paths which are not currently used by any app.

Return
Int A positive integer, maximum number of Aware data paths supported by the device. Value is 1 or greater

getNumberOfSupportedPublishSessions

Added in API level 33
fun getNumberOfSupportedPublishSessions(): Int

Returns the maximum number of Aware publish sessions supported by the device. Use AwareResources.getAvailablePublishSessionsCount() to get the number of available publish sessions which are not currently used by any app.

Return
Int A positive integer, maximum number of publish sessions supported by the device. Value is 1 or greater

getNumberOfSupportedSubscribeSessions

Added in API level 33
fun getNumberOfSupportedSubscribeSessions(): Int

Returns the maximum number of Aware subscribe session supported by the device. Use AwareResources.getAvailableSubscribeSessionsCount() to get the number of available subscribe sessions which are not currently used by any app.

Return
Int A positive integer, maximum number of subscribe sessions supported by the device. Value is 1 or greater

getSupportedCipherSuites

Added in API level 30
fun getSupportedCipherSuites(): Int

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.

Return
Int A set of flags from WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, WIFI_AWARE_CIPHER_SUITE_NCS_SK_256, WIFI_AWARE_CIPHER_SUITE_NCS_PK_128, or WIFI_AWARE_CIPHER_SUITE_NCS_PK_256 Value is either 0 or a combination of android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NONE, android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256, android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128, and android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256

getSupportedPairingCipherSuites

Added in API level 34
fun getSupportedPairingCipherSuites(): Int

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

Return
Int A set of flags from WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256, or WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256 Value is either 0 or a combination of android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128, and android.net.wifi.aware.Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256

isAwarePairingSupported

Added in API level 34
fun isAwarePairingSupported(): Boolean

Check if the Aware Pairing is supported. The Aware Pairing is defined as per Wi-Fi Alliance (WFA) Wi-Fi Aware specifications version 4.0 Section 7.6.

Return
Boolean True if supported, false otherwise.

isInstantCommunicationModeSupported

Added in API level 31
fun isInstantCommunicationModeSupported(): Boolean

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.

Return
Boolean True if supported, false otherwise.

isSuspensionSupported

Added in API level 34
fun isSuspensionSupported(): Boolean

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.

Return
Boolean True if supported, false otherwise.

writeToParcel

Added in API level 26
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 26
static val CREATOR: Parcelable.Creator<Characteristics!>