PollingFrame


public final class PollingFrame
extends Object implements Parcelable

java.lang.Object
   ↳ 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

int POLLING_LOOP_TYPE_A

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.

int POLLING_LOOP_TYPE_B

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.

int POLLING_LOOP_TYPE_F

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.

int POLLING_LOOP_TYPE_OFF

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.

int POLLING_LOOP_TYPE_ON

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.

int POLLING_LOOP_TYPE_UNKNOWN

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

Fields

public static final Creator<PollingFrame> CREATOR

Public methods

int describeContents()

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

byte[] getData()

Returns the raw data from the polling type frame.

long getTimestamp()

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

boolean getTriggeredAutoTransact()

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

int getType()

Returns the type of frame for this polling loop frame.

int getVendorSpecificGain()

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

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

POLLING_LOOP_TYPE_A

Added in API level 35
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 HostApduService.processPollingFrames(List) when the polling loop is for NFC-A.

Constant Value: 65 (0x00000041)

POLLING_LOOP_TYPE_B

Added in API level 35
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 HostApduService.processPollingFrames(List) when the polling loop is for NFC-B.

Constant Value: 66 (0x00000042)

POLLING_LOOP_TYPE_F

Added in API level 35
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 HostApduService.processPollingFrames(List) when the polling loop is for NFC-F.

Constant Value: 70 (0x00000046)

POLLING_LOOP_TYPE_OFF

Added in API level 35
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 HostApduService.processPollingFrames(List) when the polling loop turns off.

Constant Value: 88 (0x00000058)

POLLING_LOOP_TYPE_ON

Added in API level 35
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 HostApduService.processPollingFrames(List) when the polling loop turns on.

Constant Value: 79 (0x0000004f)

POLLING_LOOP_TYPE_UNKNOWN

Added in API level 35
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 HostApduService.processPollingFrames(List) when the polling loop frame isn't recognized.

Constant Value: 85 (0x00000055)

Fields

CREATOR

Added in API level 35
public static final Creator<PollingFrame> CREATOR

Public methods

describeContents

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

getData

Added in API level 35
public byte[] getData ()

Returns the raw data from the polling type frame.

Returns
byte[] This value cannot be null.

getTimestamp

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

Returns
long the timestamp in microseconds

getTriggeredAutoTransact

Added in API level 35
public boolean getTriggeredAutoTransact ()

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

Returns
boolean

getType

Added in API level 35
public int getType ()

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

Returns
int Value is POLLING_LOOP_TYPE_A, POLLING_LOOP_TYPE_B, POLLING_LOOP_TYPE_F, POLLING_LOOP_TYPE_OFF, POLLING_LOOP_TYPE_ON, or POLLING_LOOP_TYPE_UNKNOWN

getVendorSpecificGain

Added in API level 35
public int getVendorSpecificGain ()

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

Returns
int the gain or -1 if there is no gain measurement associated with this frame.

toString

Added in API level 35
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

Added in API level 35
public void writeToParcel (Parcel dest, 
                int flags)

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.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES