android.nfc
Class NdefRecord

java.lang.Object
  extended by android.nfc.NdefRecord
All Implemented Interfaces:
Parcelable

public final class NdefRecord
extends Object
implements Parcelable


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
static Parcelable.Creator<NdefRecord> CREATOR
           
static byte[] RTD_ALTERNATIVE_CARRIER
           
static byte[] RTD_HANDOVER_CARRIER
           
static byte[] RTD_HANDOVER_REQUEST
           
static byte[] RTD_HANDOVER_SELECT
           
static byte[] RTD_SMART_POSTER
           
static byte[] RTD_TEXT
           
static byte[] RTD_URI
           
static short TNF_ABSOLUTE_URI
           
static short TNF_EMPTY
           
static short TNF_EXTERNAL_TYPE
           
static short TNF_MIME_MEDIA
           
static short TNF_UNCHANGED
           
static short TNF_UNKNOWN
           
static short TNF_WELL_KNOWN
           
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
NdefRecord(byte[] data)
           
NdefRecord(short tnf, byte[] type, byte[] id, byte[] payload)
           
 
Method Summary
static NdefRecord createApplicationRecord(String packageName)
           
static NdefRecord createUri(String uriString)
           
static NdefRecord createUri(Uri uri)
           
 int describeContents()
           
 byte[] getId()
           
 byte[] getPayload()
           
 short getTnf()
           
 byte[] getType()
           
 byte[] toByteArray()
           
 void writeToParcel(Parcel dest, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TNF_EMPTY

public static final short TNF_EMPTY
See Also:
Constant Field Values

TNF_WELL_KNOWN

public static final short TNF_WELL_KNOWN
See Also:
Constant Field Values

TNF_MIME_MEDIA

public static final short TNF_MIME_MEDIA
See Also:
Constant Field Values

TNF_ABSOLUTE_URI

public static final short TNF_ABSOLUTE_URI
See Also:
Constant Field Values

TNF_EXTERNAL_TYPE

public static final short TNF_EXTERNAL_TYPE
See Also:
Constant Field Values

TNF_UNKNOWN

public static final short TNF_UNKNOWN
See Also:
Constant Field Values

TNF_UNCHANGED

public static final short TNF_UNCHANGED
See Also:
Constant Field Values

RTD_TEXT

public static final byte[] RTD_TEXT

RTD_URI

public static final byte[] RTD_URI

RTD_SMART_POSTER

public static final byte[] RTD_SMART_POSTER

RTD_ALTERNATIVE_CARRIER

public static final byte[] RTD_ALTERNATIVE_CARRIER

RTD_HANDOVER_CARRIER

public static final byte[] RTD_HANDOVER_CARRIER

RTD_HANDOVER_REQUEST

public static final byte[] RTD_HANDOVER_REQUEST

RTD_HANDOVER_SELECT

public static final byte[] RTD_HANDOVER_SELECT

CREATOR

public static final Parcelable.Creator<NdefRecord> CREATOR
Constructor Detail

NdefRecord

public NdefRecord(short tnf,
                  byte[] type,
                  byte[] id,
                  byte[] payload)

NdefRecord

public NdefRecord(byte[] data)
           throws FormatException
Throws:
FormatException
Method Detail

getTnf

public short getTnf()

getType

public byte[] getType()

getId

public byte[] getId()

getPayload

public byte[] getPayload()

createApplicationRecord

public static NdefRecord createApplicationRecord(String packageName)

createUri

public static NdefRecord createUri(Uri uri)

createUri

public static NdefRecord createUri(String uriString)

toByteArray

public byte[] toByteArray()

describeContents

public int describeContents()
Specified by:
describeContents in interface Parcelable

writeToParcel

public void writeToParcel(Parcel dest,
                          int flags)
Specified by:
writeToParcel in interface Parcelable


Copyright © 2008-2012. All Rights Reserved.