# ScanResult.InformationElement

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

# InformationElement

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/net/wifi/ScanResult.InformationElement "View this page in Java")  

```
class InformationElement : Parcelable
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                   ||
| ↳ | [android.net.wifi.ScanResult.InformationElement](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#) |

information elements from beacon.

## Summary

| Inherited constants ||
|---|---|
| From class[Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#) |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) <br /> Descriptor bit used with[describeContents()](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. <br />                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) <br /> Flag for use with[writeToParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): 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)`". Some implementations may want to release resources at this point. <br /> | ||

|                                                                                                                                                                                                                                                 Public constructors                                                                                                                                                                                                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [InformationElement](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#InformationElement(android.net.wifi.ScanResult.InformationElement))`(`rhs:` `[ScanResult.InformationElement](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#)`)` <br />                                                                                                                                                                         |
| [InformationElement](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#InformationElement(kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))`(`id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `idExt:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `bytes:` `[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)`)` Constructs InformationElements from beacon. |

|                                                                                                                                                     Public methods                                                                                                                                                      ||
|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)     | [equals](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br /> |
| open[ByteBuffer](https://developer.android.com/reference/kotlin/java/nio/ByteBuffer.html#) | [getBytes](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#getBytes())`()` Get the specific content of the information element.                                               |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)             | [getId](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#getId())`()` The element ID of the information element.                                                               |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)             | [getIdExt](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#getIdExt())`()` The element ID Extension of the information element.                                               |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)             | [hashCode](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#hashCode())`()` <br />                                                                                             |

|                                                                                                                                                                                                              Properties                                                                                                                                                                                                               ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[ScanResult.InformationElement](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#)!\> | [CREATOR](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#CREATOR:android.os.Parcelable.Creator) Implement the Parcelable interface |

## Public constructors

### InformationElement

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

```
InformationElement(rhs: ScanResult.InformationElement)
```

|                                                                             Parameters                                                                             ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `rhs` | [ScanResult.InformationElement](https://developer.android.com/reference/kotlin/android/net/wifi/ScanResult.InformationElement#):This value cannot be`null`. |

### InformationElement

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

```
InformationElement(
    id: Int, 
    idExt: Int, 
    bytes: ByteArray)
```

Constructs InformationElements from beacon.

|                                                                                           Parameters                                                                                            ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):element id                                                                                                  |
| `idExt` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):element id extension                                                                                        |
| `bytes` | [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html):the body of the information element, may contain multiple elements This value cannot be`null`. |

## Public methods

### equals

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

```
open fun equals(other: Any?): Boolean
```

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### getBytes

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

```
open fun getBytes(): ByteBuffer
```

Get the specific content of the information element.

|                                                       Return                                                        ||
|----------------------------------------------------------------------------------------|-----------------------------|
| [ByteBuffer](https://developer.android.com/reference/kotlin/java/nio/ByteBuffer.html#) | This value cannot be`null`. |

### getId

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

```
open fun getId(): Int
```

The element ID of the information element. Defined in the IEEE 802.11-2016 spec Table 9-77.  

### getIdExt

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

```
open fun getIdExt(): Int
```

The element ID Extension of the information element. Defined in the IEEE 802.11-2016 spec Table 9-77.  

### hashCode

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

```
open fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |

## Properties

### CREATOR

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

```
static val CREATOR: Parcelable.Creator<ScanResult.InformationElement!>
```

Implement the Parcelable interface