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 |
static Int |
POLLING_LOOP_TYPE_B is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to |
static Int |
POLLING_LOOP_TYPE_F is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to |
static Int |
POLLING_LOOP_TYPE_OFF is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to |
static Int |
POLLING_LOOP_TYPE_ON is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to |
static Int |
POLLING_LOOP_TYPE_UNKNOWN is the value associated with the key POLLING_LOOP_TYPE in the Bundle passed to |
Inherited constants | |
---|---|
Public methods | |
---|---|
Int | |
ByteArray |
getData() 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 |
getType() 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 |
toString() |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<PollingFrame!> |
Constants
POLLING_LOOP_TYPE_A
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
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
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
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
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
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
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
fun getData(): ByteArray
Returns the raw data from the polling type frame.
Return | |
---|---|
ByteArray |
This value cannot be null . |
getTimestamp
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
fun getTriggeredAutoTransact(): Boolean
Returns whether this frame triggered the device to automatically disable observe mode and allow one transaction.
getType
fun getType(): Int
Returns the type of frame for this polling loop frame. The possible return values are:
POLLING_LOOP_TYPE_ON
POLLING_LOOP_TYPE_OFF
POLLING_LOOP_TYPE_A
POLLING_LOOP_TYPE_B
POLLING_LOOP_TYPE_F
getVendorSpecificGain
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
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
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 |