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_APOLLING_LOOP_TYPE_A is the value associated with the key
 POLLING_LOOP_TYPE  in the Bundle passed to  | 
| int | POLLING_LOOP_TYPE_BPOLLING_LOOP_TYPE_B is the value associated with the key
 POLLING_LOOP_TYPE  in the Bundle passed to  | 
| int | POLLING_LOOP_TYPE_FPOLLING_LOOP_TYPE_F is the value associated with the key
 POLLING_LOOP_TYPE  in the Bundle passed to  | 
| int | POLLING_LOOP_TYPE_OFFPOLLING_LOOP_TYPE_OFF is the value associated with the key
 POLLING_LOOP_TYPE  in the Bundle passed to  | 
| int | POLLING_LOOP_TYPE_ONPOLLING_LOOP_TYPE_ON is the value associated with the key
 POLLING_LOOP_TYPE  in the Bundle passed to  | 
| int | POLLING_LOOP_TYPE_UNKNOWNPOLLING_LOOP_TYPE_UNKNOWN is the value associated with the key
 POLLING_LOOP_TYPE  in the Bundle passed to  | 
| 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
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
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
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
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
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
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
Public methods
describeContents
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 0orCONTENTS_FILE_DESCRIPTOR | 
getData
public byte[] getData ()
Returns the raw data from the polling type frame.
| Returns | |
|---|---|
| byte[] | This value cannot be null. | 
getTimestamp
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
public boolean getTriggeredAutoTransact ()
Returns whether this frame triggered the device to automatically disable observe mode and allow one transaction.
| Returns | |
|---|---|
| boolean | |
getType
public int getType ()
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
| Returns | |
|---|---|
| int | Value is POLLING_LOOP_TYPE_A,POLLING_LOOP_TYPE_B,POLLING_LOOP_TYPE_F,POLLING_LOOP_TYPE_OFF,POLLING_LOOP_TYPE_ON, orPOLLING_LOOP_TYPE_UNKNOWN | 
getVendorSpecificGain
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
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
| String | a string representation of the object. | 
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
| dest | Parcel: This value cannot benull. | 
| flags | int: Additional flags about how the object should be written.
 May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE.
 Value is either0or a combination ofParcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
