Added in API level 35

PollingFrame


class PollingFrame : Parcelable
kotlin.Any
   ↳ android.nfc.cardemulation.PollingFrame

Polling Frames represent data about individual frames of an NFC polling loop. These frames will be delivered to subclasses of HostApduService that have registered filters with CardEmulation.registerPollingLoopFilterForService(ComponentName, String, boolean) that match a given frame in a loop and will be delivered through calls to HostApduService.processPollingFrames(List).

Summary

Constants
static Int

POLLING_LOOP_TYPE_A is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop is for NFC-A.

static Int

POLLING_LOOP_TYPE_B is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop is for NFC-B.

static Int

POLLING_LOOP_TYPE_F is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop is for NFC-F.

static Int

POLLING_LOOP_TYPE_OFF is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop turns off.

static Int

POLLING_LOOP_TYPE_ON is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop turns on.

static Int

POLLING_LOOP_TYPE_UNKNOWN is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop frame isn't recognized.

Inherited constants
Public methods
Int

ByteArray

Returns the raw data from the polling type frame.

Long

Returns the timestamp of when the polling loop frame was observed, in microseconds.

Boolean

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

Int

Returns the type of frame for this polling loop frame.

Int

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

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<PollingFrame!>

Constants

POLLING_LOOP_TYPE_A

Added in API level 35
static val POLLING_LOOP_TYPE_A: Int

POLLING_LOOP_TYPE_A is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop is for NFC-A.

Value: 65

POLLING_LOOP_TYPE_B

Added in API level 35
static val POLLING_LOOP_TYPE_B: Int

POLLING_LOOP_TYPE_B is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop is for NFC-B.

Value: 66

POLLING_LOOP_TYPE_F

Added in API level 35
static val POLLING_LOOP_TYPE_F: Int

POLLING_LOOP_TYPE_F is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop is for NFC-F.

Value: 70

POLLING_LOOP_TYPE_OFF

Added in API level 35
static val POLLING_LOOP_TYPE_OFF: Int

POLLING_LOOP_TYPE_OFF is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop turns off.

Value: 88

POLLING_LOOP_TYPE_ON

Added in API level 35
static val POLLING_LOOP_TYPE_ON: Int

POLLING_LOOP_TYPE_ON is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop turns on.

Value: 79

POLLING_LOOP_TYPE_UNKNOWN

Added in API level 35
static val POLLING_LOOP_TYPE_UNKNOWN: Int

POLLING_LOOP_TYPE_UNKNOWN is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to HostApduService.processPollingFrames(List) when the polling loop frame isn't recognized.

Value: 85

Public methods

describeContents

Added in API level 35
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

getData

Added in API level 35
fun getData(): ByteArray

Returns the raw data from the polling type frame.

Return
ByteArray This value cannot be null.

getTimestamp

Added in API level 35
fun getTimestamp(): Long

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.

Return
Long the timestamp in microseconds

getTriggeredAutoTransact

Added in API level 35
fun getTriggeredAutoTransact(): Boolean

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

getVendorSpecificGain

Added in API level 35
fun getVendorSpecificGain(): Int

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

Return
Int the gain or -1 if there is no gain measurement associated with this frame.

toString

Added in API level 35
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 35
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: 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 35
static val CREATOR: Parcelable.Creator<PollingFrame!>