1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0 2*344a7f5eSAndroid Build Coastguard Workerpackage android.nfc { 3*344a7f5eSAndroid Build Coastguard Worker 4*344a7f5eSAndroid Build Coastguard Worker public final class AvailableNfcAntenna implements android.os.Parcelable { 5*344a7f5eSAndroid Build Coastguard Worker ctor public AvailableNfcAntenna(int, int); 6*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 7*344a7f5eSAndroid Build Coastguard Worker method public int getLocationX(); 8*344a7f5eSAndroid Build Coastguard Worker method public int getLocationY(); 9*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 10*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.AvailableNfcAntenna> CREATOR; 11*344a7f5eSAndroid Build Coastguard Worker } 12*344a7f5eSAndroid Build Coastguard Worker 13*344a7f5eSAndroid Build Coastguard Worker public class FormatException extends java.lang.Exception { 14*344a7f5eSAndroid Build Coastguard Worker ctor public FormatException(); 15*344a7f5eSAndroid Build Coastguard Worker ctor public FormatException(String); 16*344a7f5eSAndroid Build Coastguard Worker ctor public FormatException(String, Throwable); 17*344a7f5eSAndroid Build Coastguard Worker } 18*344a7f5eSAndroid Build Coastguard Worker 19*344a7f5eSAndroid Build Coastguard Worker public final class NdefMessage implements android.os.Parcelable { 20*344a7f5eSAndroid Build Coastguard Worker ctor public NdefMessage(byte[]) throws android.nfc.FormatException; 21*344a7f5eSAndroid Build Coastguard Worker ctor public NdefMessage(android.nfc.NdefRecord, android.nfc.NdefRecord...); 22*344a7f5eSAndroid Build Coastguard Worker ctor public NdefMessage(android.nfc.NdefRecord[]); 23*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 24*344a7f5eSAndroid Build Coastguard Worker method public int getByteArrayLength(); 25*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NdefRecord[] getRecords(); 26*344a7f5eSAndroid Build Coastguard Worker method public byte[] toByteArray(); 27*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 28*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefMessage> CREATOR; 29*344a7f5eSAndroid Build Coastguard Worker } 30*344a7f5eSAndroid Build Coastguard Worker 31*344a7f5eSAndroid Build Coastguard Worker public final class NdefRecord implements android.os.Parcelable { 32*344a7f5eSAndroid Build Coastguard Worker ctor public NdefRecord(short, byte[], byte[], byte[]); 33*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public NdefRecord(byte[]) throws android.nfc.FormatException; 34*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NdefRecord createApplicationRecord(String); 35*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NdefRecord createExternal(String, String, byte[]); 36*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NdefRecord createMime(String, byte[]); 37*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NdefRecord createTextRecord(String, String); 38*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NdefRecord createUri(android.net.Uri); 39*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NdefRecord createUri(String); 40*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 41*344a7f5eSAndroid Build Coastguard Worker method public byte[] getId(); 42*344a7f5eSAndroid Build Coastguard Worker method public byte[] getPayload(); 43*344a7f5eSAndroid Build Coastguard Worker method public short getTnf(); 44*344a7f5eSAndroid Build Coastguard Worker method public byte[] getType(); 45*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public byte[] toByteArray(); 46*344a7f5eSAndroid Build Coastguard Worker method public String toMimeType(); 47*344a7f5eSAndroid Build Coastguard Worker method public android.net.Uri toUri(); 48*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 49*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefRecord> CREATOR; 50*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_ALTERNATIVE_CARRIER; 51*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_HANDOVER_CARRIER; 52*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_HANDOVER_REQUEST; 53*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_HANDOVER_SELECT; 54*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_SMART_POSTER; 55*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_TEXT; 56*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] RTD_URI; 57*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_ABSOLUTE_URI = 3; // 0x3 58*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_EMPTY = 0; // 0x0 59*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_EXTERNAL_TYPE = 4; // 0x4 60*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_MIME_MEDIA = 2; // 0x2 61*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_UNCHANGED = 6; // 0x6 62*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_UNKNOWN = 5; // 0x5 63*344a7f5eSAndroid Build Coastguard Worker field public static final short TNF_WELL_KNOWN = 1; // 0x1 64*344a7f5eSAndroid Build Coastguard Worker } 65*344a7f5eSAndroid Build Coastguard Worker 66*344a7f5eSAndroid Build Coastguard Worker public final class NfcAdapter { 67*344a7f5eSAndroid Build Coastguard Worker method public void disableForegroundDispatch(android.app.Activity); 68*344a7f5eSAndroid Build Coastguard Worker method public void disableReaderMode(android.app.Activity); 69*344a7f5eSAndroid Build Coastguard Worker method public void enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]); 70*344a7f5eSAndroid Build Coastguard Worker method public void enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle); 71*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.NfcAdapter getDefaultAdapter(android.content.Context); 72*344a7f5eSAndroid Build Coastguard Worker method @Nullable public android.nfc.NfcAntennaInfo getNfcAntennaInfo(); 73*344a7f5eSAndroid Build Coastguard Worker method public boolean ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler); 74*344a7f5eSAndroid Build Coastguard Worker method public boolean isEnabled(); 75*344a7f5eSAndroid Build Coastguard Worker method public boolean isSecureNfcEnabled(); 76*344a7f5eSAndroid Build Coastguard Worker method public boolean isSecureNfcSupported(); 77*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED"; 78*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED"; 79*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static final String ACTION_PREFERRED_PAYMENT_CHANGED = "android.nfc.action.PREFERRED_PAYMENT_CHANGED"; 80*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED"; 81*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED"; 82*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.NFC_TRANSACTION_EVENT) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; 83*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE"; 84*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_AID = "android.nfc.extra.AID"; 85*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_DATA = "android.nfc.extra.DATA"; 86*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_ID = "android.nfc.extra.ID"; 87*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES"; 88*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_PREFERRED_PAYMENT_CHANGED_REASON = "android.nfc.extra.PREFERRED_PAYMENT_CHANGED_REASON"; 89*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence"; 90*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME"; 91*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_TAG = "android.nfc.extra.TAG"; 92*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_A = 1; // 0x1 93*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_B = 2; // 0x2 94*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_BARCODE = 16; // 0x10 95*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_F = 4; // 0x4 96*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_V = 8; // 0x8 97*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NO_PLATFORM_SOUNDS = 256; // 0x100 98*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_SKIP_NDEF_CHECK = 128; // 0x80 99*344a7f5eSAndroid Build Coastguard Worker field public static final int PREFERRED_PAYMENT_CHANGED = 2; // 0x2 100*344a7f5eSAndroid Build Coastguard Worker field public static final int PREFERRED_PAYMENT_LOADED = 1; // 0x1 101*344a7f5eSAndroid Build Coastguard Worker field public static final int PREFERRED_PAYMENT_UPDATED = 3; // 0x3 102*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_OFF = 1; // 0x1 103*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_ON = 3; // 0x3 104*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_TURNING_OFF = 4; // 0x4 105*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_TURNING_ON = 2; // 0x2 106*344a7f5eSAndroid Build Coastguard Worker } 107*344a7f5eSAndroid Build Coastguard Worker 108*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface NfcAdapter.CreateBeamUrisCallback { 109*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.net.Uri[] createBeamUris(android.nfc.NfcEvent); 110*344a7f5eSAndroid Build Coastguard Worker } 111*344a7f5eSAndroid Build Coastguard Worker 112*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface NfcAdapter.CreateNdefMessageCallback { 113*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent); 114*344a7f5eSAndroid Build Coastguard Worker } 115*344a7f5eSAndroid Build Coastguard Worker 116*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface NfcAdapter.OnNdefPushCompleteCallback { 117*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void onNdefPushComplete(android.nfc.NfcEvent); 118*344a7f5eSAndroid Build Coastguard Worker } 119*344a7f5eSAndroid Build Coastguard Worker 120*344a7f5eSAndroid Build Coastguard Worker public static interface NfcAdapter.OnTagRemovedListener { 121*344a7f5eSAndroid Build Coastguard Worker method public void onTagRemoved(); 122*344a7f5eSAndroid Build Coastguard Worker } 123*344a7f5eSAndroid Build Coastguard Worker 124*344a7f5eSAndroid Build Coastguard Worker public static interface NfcAdapter.ReaderCallback { 125*344a7f5eSAndroid Build Coastguard Worker method public void onTagDiscovered(android.nfc.Tag); 126*344a7f5eSAndroid Build Coastguard Worker } 127*344a7f5eSAndroid Build Coastguard Worker 128*344a7f5eSAndroid Build Coastguard Worker public final class NfcAntennaInfo implements android.os.Parcelable { 129*344a7f5eSAndroid Build Coastguard Worker ctor public NfcAntennaInfo(int, int, boolean, @NonNull java.util.List<android.nfc.AvailableNfcAntenna>); 130*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 131*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.nfc.AvailableNfcAntenna> getAvailableNfcAntennas(); 132*344a7f5eSAndroid Build Coastguard Worker method public int getDeviceHeight(); 133*344a7f5eSAndroid Build Coastguard Worker method public int getDeviceWidth(); 134*344a7f5eSAndroid Build Coastguard Worker method public boolean isDeviceFoldable(); 135*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 136*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NfcAntennaInfo> CREATOR; 137*344a7f5eSAndroid Build Coastguard Worker } 138*344a7f5eSAndroid Build Coastguard Worker 139*344a7f5eSAndroid Build Coastguard Worker public final class NfcEvent { 140*344a7f5eSAndroid Build Coastguard Worker field public final android.nfc.NfcAdapter nfcAdapter; 141*344a7f5eSAndroid Build Coastguard Worker field public final int peerLlcpMajorVersion; 142*344a7f5eSAndroid Build Coastguard Worker field public final int peerLlcpMinorVersion; 143*344a7f5eSAndroid Build Coastguard Worker } 144*344a7f5eSAndroid Build Coastguard Worker 145*344a7f5eSAndroid Build Coastguard Worker public final class NfcManager { 146*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NfcAdapter getDefaultAdapter(); 147*344a7f5eSAndroid Build Coastguard Worker } 148*344a7f5eSAndroid Build Coastguard Worker 149*344a7f5eSAndroid Build Coastguard Worker public final class Tag implements android.os.Parcelable { 150*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 151*344a7f5eSAndroid Build Coastguard Worker method public byte[] getId(); 152*344a7f5eSAndroid Build Coastguard Worker method public String[] getTechList(); 153*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 154*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.Tag> CREATOR; 155*344a7f5eSAndroid Build Coastguard Worker } 156*344a7f5eSAndroid Build Coastguard Worker 157*344a7f5eSAndroid Build Coastguard Worker public class TagLostException extends java.io.IOException { 158*344a7f5eSAndroid Build Coastguard Worker ctor public TagLostException(); 159*344a7f5eSAndroid Build Coastguard Worker ctor public TagLostException(String); 160*344a7f5eSAndroid Build Coastguard Worker } 161*344a7f5eSAndroid Build Coastguard Worker 162*344a7f5eSAndroid Build Coastguard Worker} 163*344a7f5eSAndroid Build Coastguard Worker 164*344a7f5eSAndroid Build Coastguard Workerpackage android.nfc.cardemulation { 165*344a7f5eSAndroid Build Coastguard Worker 166*344a7f5eSAndroid Build Coastguard Worker public final class CardEmulation { 167*344a7f5eSAndroid Build Coastguard Worker method public boolean categoryAllowsForegroundPreference(String); 168*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public java.util.List<java.lang.String> getAidsForPreferredPaymentService(); 169*344a7f5eSAndroid Build Coastguard Worker method public java.util.List<java.lang.String> getAidsForService(android.content.ComponentName, String); 170*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public CharSequence getDescriptionForPreferredPaymentService(); 171*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.cardemulation.CardEmulation getInstance(android.nfc.NfcAdapter); 172*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public String getRouteDestinationForPreferredPaymentService(); 173*344a7f5eSAndroid Build Coastguard Worker method public int getSelectionModeForCategory(String); 174*344a7f5eSAndroid Build Coastguard Worker method public boolean isDefaultServiceForAid(android.content.ComponentName, String); 175*344a7f5eSAndroid Build Coastguard Worker method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); 176*344a7f5eSAndroid Build Coastguard Worker method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); 177*344a7f5eSAndroid Build Coastguard Worker method public boolean removeAidsForService(android.content.ComponentName, String); 178*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); 179*344a7f5eSAndroid Build Coastguard Worker method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); 180*344a7f5eSAndroid Build Coastguard Worker method public boolean supportsAidPrefixRegistration(); 181*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean unsetOffHostForService(@NonNull android.content.ComponentName); 182*344a7f5eSAndroid Build Coastguard Worker method public boolean unsetPreferredService(android.app.Activity); 183*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; 184*344a7f5eSAndroid Build Coastguard Worker field public static final String CATEGORY_OTHER = "other"; 185*344a7f5eSAndroid Build Coastguard Worker field public static final String CATEGORY_PAYMENT = "payment"; 186*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CATEGORY = "category"; 187*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_SERVICE_COMPONENT = "component"; 188*344a7f5eSAndroid Build Coastguard Worker field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1 189*344a7f5eSAndroid Build Coastguard Worker field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2 190*344a7f5eSAndroid Build Coastguard Worker field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0 191*344a7f5eSAndroid Build Coastguard Worker } 192*344a7f5eSAndroid Build Coastguard Worker 193*344a7f5eSAndroid Build Coastguard Worker public abstract class HostApduService extends android.app.Service { 194*344a7f5eSAndroid Build Coastguard Worker ctor public HostApduService(); 195*344a7f5eSAndroid Build Coastguard Worker method public final void notifyUnhandled(); 196*344a7f5eSAndroid Build Coastguard Worker method public final android.os.IBinder onBind(android.content.Intent); 197*344a7f5eSAndroid Build Coastguard Worker method public abstract void onDeactivated(int); 198*344a7f5eSAndroid Build Coastguard Worker method public abstract byte[] processCommandApdu(byte[], android.os.Bundle); 199*344a7f5eSAndroid Build Coastguard Worker method public final void sendResponseApdu(byte[]); 200*344a7f5eSAndroid Build Coastguard Worker field public static final int DEACTIVATION_DESELECTED = 1; // 0x1 201*344a7f5eSAndroid Build Coastguard Worker field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 202*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_APDU_SERVICE"; 203*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service"; 204*344a7f5eSAndroid Build Coastguard Worker } 205*344a7f5eSAndroid Build Coastguard Worker 206*344a7f5eSAndroid Build Coastguard Worker public abstract class HostNfcFService extends android.app.Service { 207*344a7f5eSAndroid Build Coastguard Worker ctor public HostNfcFService(); 208*344a7f5eSAndroid Build Coastguard Worker method public final android.os.IBinder onBind(android.content.Intent); 209*344a7f5eSAndroid Build Coastguard Worker method public abstract void onDeactivated(int); 210*344a7f5eSAndroid Build Coastguard Worker method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle); 211*344a7f5eSAndroid Build Coastguard Worker method public final void sendResponsePacket(byte[]); 212*344a7f5eSAndroid Build Coastguard Worker field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 213*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE"; 214*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service"; 215*344a7f5eSAndroid Build Coastguard Worker } 216*344a7f5eSAndroid Build Coastguard Worker 217*344a7f5eSAndroid Build Coastguard Worker public final class NfcFCardEmulation { 218*344a7f5eSAndroid Build Coastguard Worker method public boolean disableService(android.app.Activity) throws java.lang.RuntimeException; 219*344a7f5eSAndroid Build Coastguard Worker method public boolean enableService(android.app.Activity, android.content.ComponentName) throws java.lang.RuntimeException; 220*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter); 221*344a7f5eSAndroid Build Coastguard Worker method public String getNfcid2ForService(android.content.ComponentName) throws java.lang.RuntimeException; 222*344a7f5eSAndroid Build Coastguard Worker method public String getSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; 223*344a7f5eSAndroid Build Coastguard Worker method public boolean registerSystemCodeForService(android.content.ComponentName, String) throws java.lang.RuntimeException; 224*344a7f5eSAndroid Build Coastguard Worker method public boolean setNfcid2ForService(android.content.ComponentName, String) throws java.lang.RuntimeException; 225*344a7f5eSAndroid Build Coastguard Worker method public boolean unregisterSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; 226*344a7f5eSAndroid Build Coastguard Worker } 227*344a7f5eSAndroid Build Coastguard Worker 228*344a7f5eSAndroid Build Coastguard Worker public abstract class OffHostApduService extends android.app.Service { 229*344a7f5eSAndroid Build Coastguard Worker ctor public OffHostApduService(); 230*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE"; 231*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.off_host_apdu_service"; 232*344a7f5eSAndroid Build Coastguard Worker } 233*344a7f5eSAndroid Build Coastguard Worker 234*344a7f5eSAndroid Build Coastguard Worker} 235*344a7f5eSAndroid Build Coastguard Worker 236*344a7f5eSAndroid Build Coastguard Workerpackage android.nfc.tech { 237*344a7f5eSAndroid Build Coastguard Worker 238*344a7f5eSAndroid Build Coastguard Worker public final class IsoDep implements android.nfc.tech.TagTechnology { 239*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 240*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 241*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.IsoDep get(android.nfc.Tag); 242*344a7f5eSAndroid Build Coastguard Worker method public byte[] getHiLayerResponse(); 243*344a7f5eSAndroid Build Coastguard Worker method public byte[] getHistoricalBytes(); 244*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 245*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 246*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 247*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 248*344a7f5eSAndroid Build Coastguard Worker method public boolean isExtendedLengthApduSupported(); 249*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 250*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 251*344a7f5eSAndroid Build Coastguard Worker } 252*344a7f5eSAndroid Build Coastguard Worker 253*344a7f5eSAndroid Build Coastguard Worker public final class MifareClassic implements android.nfc.tech.TagTechnology { 254*344a7f5eSAndroid Build Coastguard Worker method public boolean authenticateSectorWithKeyA(int, byte[]) throws java.io.IOException; 255*344a7f5eSAndroid Build Coastguard Worker method public boolean authenticateSectorWithKeyB(int, byte[]) throws java.io.IOException; 256*344a7f5eSAndroid Build Coastguard Worker method public int blockToSector(int); 257*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 258*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 259*344a7f5eSAndroid Build Coastguard Worker method public void decrement(int, int) throws java.io.IOException; 260*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.MifareClassic get(android.nfc.Tag); 261*344a7f5eSAndroid Build Coastguard Worker method public int getBlockCount(); 262*344a7f5eSAndroid Build Coastguard Worker method public int getBlockCountInSector(int); 263*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 264*344a7f5eSAndroid Build Coastguard Worker method public int getSectorCount(); 265*344a7f5eSAndroid Build Coastguard Worker method public int getSize(); 266*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 267*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 268*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 269*344a7f5eSAndroid Build Coastguard Worker method public void increment(int, int) throws java.io.IOException; 270*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 271*344a7f5eSAndroid Build Coastguard Worker method public byte[] readBlock(int) throws java.io.IOException; 272*344a7f5eSAndroid Build Coastguard Worker method public void restore(int) throws java.io.IOException; 273*344a7f5eSAndroid Build Coastguard Worker method public int sectorToBlock(int); 274*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 275*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 276*344a7f5eSAndroid Build Coastguard Worker method public void transfer(int) throws java.io.IOException; 277*344a7f5eSAndroid Build Coastguard Worker method public void writeBlock(int, byte[]) throws java.io.IOException; 278*344a7f5eSAndroid Build Coastguard Worker field public static final int BLOCK_SIZE = 16; // 0x10 279*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] KEY_DEFAULT; 280*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY; 281*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] KEY_NFC_FORUM; 282*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_1K = 1024; // 0x400 283*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_2K = 2048; // 0x800 284*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_4K = 4096; // 0x1000 285*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_MINI = 320; // 0x140 286*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_CLASSIC = 0; // 0x0 287*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_PLUS = 1; // 0x1 288*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_PRO = 2; // 0x2 289*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNKNOWN = -1; // 0xffffffff 290*344a7f5eSAndroid Build Coastguard Worker } 291*344a7f5eSAndroid Build Coastguard Worker 292*344a7f5eSAndroid Build Coastguard Worker public final class MifareUltralight implements android.nfc.tech.TagTechnology { 293*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 294*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 295*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.MifareUltralight get(android.nfc.Tag); 296*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 297*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 298*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 299*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 300*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 301*344a7f5eSAndroid Build Coastguard Worker method public byte[] readPages(int) throws java.io.IOException; 302*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 303*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 304*344a7f5eSAndroid Build Coastguard Worker method public void writePage(int, byte[]) throws java.io.IOException; 305*344a7f5eSAndroid Build Coastguard Worker field public static final int PAGE_SIZE = 4; // 0x4 306*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_ULTRALIGHT = 1; // 0x1 307*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_ULTRALIGHT_C = 2; // 0x2 308*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNKNOWN = -1; // 0xffffffff 309*344a7f5eSAndroid Build Coastguard Worker } 310*344a7f5eSAndroid Build Coastguard Worker 311*344a7f5eSAndroid Build Coastguard Worker public final class Ndef implements android.nfc.tech.TagTechnology { 312*344a7f5eSAndroid Build Coastguard Worker method public boolean canMakeReadOnly(); 313*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 314*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 315*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.Ndef get(android.nfc.Tag); 316*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NdefMessage getCachedNdefMessage(); 317*344a7f5eSAndroid Build Coastguard Worker method public int getMaxSize(); 318*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NdefMessage getNdefMessage() throws android.nfc.FormatException, java.io.IOException; 319*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 320*344a7f5eSAndroid Build Coastguard Worker method public String getType(); 321*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 322*344a7f5eSAndroid Build Coastguard Worker method public boolean isWritable(); 323*344a7f5eSAndroid Build Coastguard Worker method public boolean makeReadOnly() throws java.io.IOException; 324*344a7f5eSAndroid Build Coastguard Worker method public void writeNdefMessage(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; 325*344a7f5eSAndroid Build Coastguard Worker field public static final String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic"; 326*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1"; 327*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2"; 328*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3"; 329*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4"; 330*344a7f5eSAndroid Build Coastguard Worker } 331*344a7f5eSAndroid Build Coastguard Worker 332*344a7f5eSAndroid Build Coastguard Worker public final class NdefFormatable implements android.nfc.tech.TagTechnology { 333*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 334*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 335*344a7f5eSAndroid Build Coastguard Worker method public void format(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; 336*344a7f5eSAndroid Build Coastguard Worker method public void formatReadOnly(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; 337*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NdefFormatable get(android.nfc.Tag); 338*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 339*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 340*344a7f5eSAndroid Build Coastguard Worker } 341*344a7f5eSAndroid Build Coastguard Worker 342*344a7f5eSAndroid Build Coastguard Worker public final class NfcA implements android.nfc.tech.TagTechnology { 343*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 344*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 345*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcA get(android.nfc.Tag); 346*344a7f5eSAndroid Build Coastguard Worker method public byte[] getAtqa(); 347*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 348*344a7f5eSAndroid Build Coastguard Worker method public short getSak(); 349*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 350*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 351*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 352*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 353*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 354*344a7f5eSAndroid Build Coastguard Worker } 355*344a7f5eSAndroid Build Coastguard Worker 356*344a7f5eSAndroid Build Coastguard Worker public final class NfcB implements android.nfc.tech.TagTechnology { 357*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 358*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 359*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcB get(android.nfc.Tag); 360*344a7f5eSAndroid Build Coastguard Worker method public byte[] getApplicationData(); 361*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 362*344a7f5eSAndroid Build Coastguard Worker method public byte[] getProtocolInfo(); 363*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 364*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 365*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 366*344a7f5eSAndroid Build Coastguard Worker } 367*344a7f5eSAndroid Build Coastguard Worker 368*344a7f5eSAndroid Build Coastguard Worker public final class NfcBarcode implements android.nfc.tech.TagTechnology { 369*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 370*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 371*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag); 372*344a7f5eSAndroid Build Coastguard Worker method public byte[] getBarcode(); 373*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 374*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 375*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 376*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_KOVIO = 1; // 0x1 377*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNKNOWN = -1; // 0xffffffff 378*344a7f5eSAndroid Build Coastguard Worker } 379*344a7f5eSAndroid Build Coastguard Worker 380*344a7f5eSAndroid Build Coastguard Worker public final class NfcF implements android.nfc.tech.TagTechnology { 381*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 382*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 383*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcF get(android.nfc.Tag); 384*344a7f5eSAndroid Build Coastguard Worker method public byte[] getManufacturer(); 385*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 386*344a7f5eSAndroid Build Coastguard Worker method public byte[] getSystemCode(); 387*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 388*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 389*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 390*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 391*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 392*344a7f5eSAndroid Build Coastguard Worker } 393*344a7f5eSAndroid Build Coastguard Worker 394*344a7f5eSAndroid Build Coastguard Worker public final class NfcV implements android.nfc.tech.TagTechnology { 395*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 396*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 397*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcV get(android.nfc.Tag); 398*344a7f5eSAndroid Build Coastguard Worker method public byte getDsfId(); 399*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 400*344a7f5eSAndroid Build Coastguard Worker method public byte getResponseFlags(); 401*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 402*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 403*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 404*344a7f5eSAndroid Build Coastguard Worker } 405*344a7f5eSAndroid Build Coastguard Worker 406*344a7f5eSAndroid Build Coastguard Worker public interface TagTechnology extends java.io.Closeable { 407*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 408*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 409*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 410*344a7f5eSAndroid Build Coastguard Worker } 411*344a7f5eSAndroid Build Coastguard Worker 412*344a7f5eSAndroid Build Coastguard Worker} 413*344a7f5eSAndroid Build Coastguard Worker 414