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

# PollingFrame

*** ** * ** ***

` public final class PollingFrame `   
` 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.nfc.cardemulation.PollingFrame |

<br />

*** ** * ** ***

Polling Frames represent data about individual frames of an NFC polling loop. These frames will be delivered to subclasses of `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService` that have registered filters with `https://developer.android.com/reference/android/nfc/cardemulation/CardEmulation#registerPollingLoopFilterForService(android.content.ComponentName,%20java.lang.String,%20boolean)` that match a given frame in a loop and will be delivered through calls to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_A` POLLING_LOOP_TYPE_A is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop is for NFC-A. |
| `int` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_B` POLLING_LOOP_TYPE_B is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop is for NFC-B. |
| `int` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_F` POLLING_LOOP_TYPE_F is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop is for NFC-F. |
| `int` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_OFF` POLLING_LOOP_TYPE_OFF is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop turns off. |
| `int` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_ON` POLLING_LOOP_TYPE_ON is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop turns on. |
| `int` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_UNKNOWN` POLLING_LOOP_TYPE_UNKNOWN is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop frame isn't recognized. |

### 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/nfc/cardemulation/PollingFrame>` | `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#CREATOR` <br /> |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` byte[]` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#getData()() ` Returns the raw data from the polling type frame. |
| ` long` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#getTimestamp()() ` Returns the timestamp of when the polling loop frame was observed, in microseconds. |
| ` boolean` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#getTriggeredAutoTransact()() ` Returns whether this frame triggered the device to automatically disable observe mode and allow one transaction. |
| ` int` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#getType()() ` Returns the type of frame for this polling loop frame. |
| ` int` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#getVendorSpecificGain()() ` Returns the gain representing the field strength of the NFC field when this polling loop frame was observed. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#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

### POLLING_LOOP_TYPE_A

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

```
public static final int POLLING_LOOP_TYPE_A
```

POLLING_LOOP_TYPE_A is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop is for NFC-A.

<br />

Constant Value: 65 (0x00000041)

### POLLING_LOOP_TYPE_B

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

```
public static final int POLLING_LOOP_TYPE_B
```

POLLING_LOOP_TYPE_B is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop is for NFC-B.

<br />

Constant Value: 66 (0x00000042)

### POLLING_LOOP_TYPE_F

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

```
public static final int POLLING_LOOP_TYPE_F
```

POLLING_LOOP_TYPE_F is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop is for NFC-F.

<br />

Constant Value: 70 (0x00000046)

### POLLING_LOOP_TYPE_OFF

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

```
public static final int POLLING_LOOP_TYPE_OFF
```

POLLING_LOOP_TYPE_OFF is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop turns off.

<br />

Constant Value: 88 (0x00000058)

### POLLING_LOOP_TYPE_ON

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

```
public static final int POLLING_LOOP_TYPE_ON
```

POLLING_LOOP_TYPE_ON is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop turns on.

<br />

Constant Value: 79 (0x0000004f)

### POLLING_LOOP_TYPE_UNKNOWN

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

```
public static final int POLLING_LOOP_TYPE_UNKNOWN
```

POLLING_LOOP_TYPE_UNKNOWN is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to `https://developer.android.com/reference/android/nfc/cardemulation/HostApduService#processPollingFrames(java.util.List<android.nfc.cardemulation.PollingFrame>)` when the polling loop frame isn't recognized.

<br />

Constant Value: 85 (0x00000055)

## Fields

### CREATOR

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

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

<br />

<br />

## Public methods

### describeContents

Added in [API level 35](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` |

### getData

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

```
public byte[] getData ()
```

Returns the raw data from the polling type frame.

<br />

| Returns ||
|---|---|
| `byte[]` | This value cannot be `null`. <br /> |

### getTimestamp

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

```
public long getTimestamp ()
```

Returns the timestamp of when the polling loop frame was observed, in microseconds. These timestamps are relative and should only be used for comparing the timing of frames relative to each other.

<br />

| Returns ||
|---|---|
| `long` | the timestamp in microseconds <br /> |

### getTriggeredAutoTransact

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

```
public boolean getTriggeredAutoTransact ()
```

Returns whether this frame triggered the device to automatically disable observe mode and allow one transaction.

<br />

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

### getType

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

```
public int getType ()
```

Returns the type of frame for this polling loop frame. The possible return values are:

- `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_ON`
- `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_OFF`
- `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_A`
- `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_B`
- `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_F`

<br />

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_A` - `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_B` - `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_F` - `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_OFF` - `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_ON` - `https://developer.android.com/reference/android/nfc/cardemulation/PollingFrame#POLLING_LOOP_TYPE_UNKNOWN` |

### getVendorSpecificGain

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

```
public int getVendorSpecificGain ()
```

Returns the gain representing the field strength of the NFC field when this polling loop frame was observed.

<br />

| Returns ||
|---|---|
| `int` | the gain or -1 if there is no gain measurement associated with this frame. <br /> |

### toString

Added in [API level 35](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 /> |

### writeToParcel

Added in [API level 35](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`: 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` |