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 isObserveModeEnabled(); 76*344a7f5eSAndroid Build Coastguard Worker method public boolean isObserveModeSupported(); 77*344a7f5eSAndroid Build Coastguard Worker method public boolean isReaderOptionEnabled(); 78*344a7f5eSAndroid Build Coastguard Worker method public boolean isReaderOptionSupported(); 79*344a7f5eSAndroid Build Coastguard Worker method public boolean isSecureNfcEnabled(); 80*344a7f5eSAndroid Build Coastguard Worker method public boolean isSecureNfcSupported(); 81*344a7f5eSAndroid Build Coastguard Worker method public void resetDiscoveryTechnology(@NonNull android.app.Activity); 82*344a7f5eSAndroid Build Coastguard Worker method public void setDiscoveryTechnology(@NonNull android.app.Activity, int, int); 83*344a7f5eSAndroid Build Coastguard Worker method public boolean setObserveModeEnabled(boolean); 84*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED"; 85*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED"; 86*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"; 87*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED"; 88*344a7f5eSAndroid Build Coastguard Worker field public static final String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED"; 89*344a7f5eSAndroid Build Coastguard Worker field @RequiresPermission(android.Manifest.permission.NFC_TRANSACTION_EVENT) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; 90*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE"; 91*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_AID = "android.nfc.extra.AID"; 92*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_DATA = "android.nfc.extra.DATA"; 93*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_ID = "android.nfc.extra.ID"; 94*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES"; 95*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_PREFERRED_PAYMENT_CHANGED_REASON = "android.nfc.extra.PREFERRED_PAYMENT_CHANGED_REASON"; 96*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence"; 97*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME"; 98*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_TAG = "android.nfc.extra.TAG"; 99*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_LISTEN_DISABLE = 0; // 0x0 100*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_LISTEN_KEEP = -2147483648; // 0x80000000 101*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_LISTEN_NFC_PASSIVE_A = 1; // 0x1 102*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_LISTEN_NFC_PASSIVE_B = 2; // 0x2 103*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_LISTEN_NFC_PASSIVE_F = 4; // 0x4 104*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_DISABLE = 0; // 0x0 105*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_KEEP = -2147483648; // 0x80000000 106*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_A = 1; // 0x1 107*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_B = 2; // 0x2 108*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_BARCODE = 16; // 0x10 109*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_F = 4; // 0x4 110*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NFC_V = 8; // 0x8 111*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_NO_PLATFORM_SOUNDS = 256; // 0x100 112*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_READER_SKIP_NDEF_CHECK = 128; // 0x80 113*344a7f5eSAndroid Build Coastguard Worker field public static final int PREFERRED_PAYMENT_CHANGED = 2; // 0x2 114*344a7f5eSAndroid Build Coastguard Worker field public static final int PREFERRED_PAYMENT_LOADED = 1; // 0x1 115*344a7f5eSAndroid Build Coastguard Worker field public static final int PREFERRED_PAYMENT_UPDATED = 3; // 0x3 116*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_OFF = 1; // 0x1 117*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_ON = 3; // 0x3 118*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_TURNING_OFF = 4; // 0x4 119*344a7f5eSAndroid Build Coastguard Worker field public static final int STATE_TURNING_ON = 2; // 0x2 120*344a7f5eSAndroid Build Coastguard Worker } 121*344a7f5eSAndroid Build Coastguard Worker 122*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface NfcAdapter.CreateBeamUrisCallback { 123*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.net.Uri[] createBeamUris(android.nfc.NfcEvent); 124*344a7f5eSAndroid Build Coastguard Worker } 125*344a7f5eSAndroid Build Coastguard Worker 126*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface NfcAdapter.CreateNdefMessageCallback { 127*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent); 128*344a7f5eSAndroid Build Coastguard Worker } 129*344a7f5eSAndroid Build Coastguard Worker 130*344a7f5eSAndroid Build Coastguard Worker @Deprecated public static interface NfcAdapter.OnNdefPushCompleteCallback { 131*344a7f5eSAndroid Build Coastguard Worker method @Deprecated public void onNdefPushComplete(android.nfc.NfcEvent); 132*344a7f5eSAndroid Build Coastguard Worker } 133*344a7f5eSAndroid Build Coastguard Worker 134*344a7f5eSAndroid Build Coastguard Worker public static interface NfcAdapter.OnTagRemovedListener { 135*344a7f5eSAndroid Build Coastguard Worker method public void onTagRemoved(); 136*344a7f5eSAndroid Build Coastguard Worker } 137*344a7f5eSAndroid Build Coastguard Worker 138*344a7f5eSAndroid Build Coastguard Worker public static interface NfcAdapter.ReaderCallback { 139*344a7f5eSAndroid Build Coastguard Worker method public void onTagDiscovered(android.nfc.Tag); 140*344a7f5eSAndroid Build Coastguard Worker } 141*344a7f5eSAndroid Build Coastguard Worker 142*344a7f5eSAndroid Build Coastguard Worker public final class NfcAntennaInfo implements android.os.Parcelable { 143*344a7f5eSAndroid Build Coastguard Worker ctor public NfcAntennaInfo(int, int, boolean, @NonNull java.util.List<android.nfc.AvailableNfcAntenna>); 144*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 145*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<android.nfc.AvailableNfcAntenna> getAvailableNfcAntennas(); 146*344a7f5eSAndroid Build Coastguard Worker method public int getDeviceHeight(); 147*344a7f5eSAndroid Build Coastguard Worker method public int getDeviceWidth(); 148*344a7f5eSAndroid Build Coastguard Worker method public boolean isDeviceFoldable(); 149*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 150*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NfcAntennaInfo> CREATOR; 151*344a7f5eSAndroid Build Coastguard Worker } 152*344a7f5eSAndroid Build Coastguard Worker 153*344a7f5eSAndroid Build Coastguard Worker public final class NfcEvent { 154*344a7f5eSAndroid Build Coastguard Worker field public final android.nfc.NfcAdapter nfcAdapter; 155*344a7f5eSAndroid Build Coastguard Worker field public final int peerLlcpMajorVersion; 156*344a7f5eSAndroid Build Coastguard Worker field public final int peerLlcpMinorVersion; 157*344a7f5eSAndroid Build Coastguard Worker } 158*344a7f5eSAndroid Build Coastguard Worker 159*344a7f5eSAndroid Build Coastguard Worker public final class NfcManager { 160*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NfcAdapter getDefaultAdapter(); 161*344a7f5eSAndroid Build Coastguard Worker } 162*344a7f5eSAndroid Build Coastguard Worker 163*344a7f5eSAndroid Build Coastguard Worker public final class Tag implements android.os.Parcelable { 164*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 165*344a7f5eSAndroid Build Coastguard Worker method public byte[] getId(); 166*344a7f5eSAndroid Build Coastguard Worker method public String[] getTechList(); 167*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(android.os.Parcel, int); 168*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.Tag> CREATOR; 169*344a7f5eSAndroid Build Coastguard Worker } 170*344a7f5eSAndroid Build Coastguard Worker 171*344a7f5eSAndroid Build Coastguard Worker public class TagLostException extends java.io.IOException { 172*344a7f5eSAndroid Build Coastguard Worker ctor public TagLostException(); 173*344a7f5eSAndroid Build Coastguard Worker ctor public TagLostException(String); 174*344a7f5eSAndroid Build Coastguard Worker } 175*344a7f5eSAndroid Build Coastguard Worker 176*344a7f5eSAndroid Build Coastguard Worker} 177*344a7f5eSAndroid Build Coastguard Worker 178*344a7f5eSAndroid Build Coastguard Workerpackage android.nfc.cardemulation { 179*344a7f5eSAndroid Build Coastguard Worker 180*344a7f5eSAndroid Build Coastguard Worker public final class CardEmulation { 181*344a7f5eSAndroid Build Coastguard Worker method public boolean categoryAllowsForegroundPreference(String); 182*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public java.util.List<java.lang.String> getAidsForPreferredPaymentService(); 183*344a7f5eSAndroid Build Coastguard Worker method public java.util.List<java.lang.String> getAidsForService(android.content.ComponentName, String); 184*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public CharSequence getDescriptionForPreferredPaymentService(); 185*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.cardemulation.CardEmulation getInstance(android.nfc.NfcAdapter); 186*344a7f5eSAndroid Build Coastguard Worker method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public String getRouteDestinationForPreferredPaymentService(); 187*344a7f5eSAndroid Build Coastguard Worker method public int getSelectionModeForCategory(String); 188*344a7f5eSAndroid Build Coastguard Worker method public boolean isDefaultServiceForAid(android.content.ComponentName, String); 189*344a7f5eSAndroid Build Coastguard Worker method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); 190*344a7f5eSAndroid Build Coastguard Worker method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); 191*344a7f5eSAndroid Build Coastguard Worker method public boolean registerPollingLoopFilterForService(@NonNull android.content.ComponentName, @NonNull String, boolean); 192*344a7f5eSAndroid Build Coastguard Worker method public boolean registerPollingLoopPatternFilterForService(@NonNull android.content.ComponentName, @NonNull String, boolean); 193*344a7f5eSAndroid Build Coastguard Worker method public boolean removeAidsForService(android.content.ComponentName, String); 194*344a7f5eSAndroid Build Coastguard Worker method public boolean removePollingLoopFilterForService(@NonNull android.content.ComponentName, @NonNull String); 195*344a7f5eSAndroid Build Coastguard Worker method public boolean removePollingLoopPatternFilterForService(@NonNull android.content.ComponentName, @NonNull String); 196*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); 197*344a7f5eSAndroid Build Coastguard Worker method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); 198*344a7f5eSAndroid Build Coastguard Worker method public boolean setShouldDefaultToObserveModeForService(@NonNull android.content.ComponentName, boolean); 199*344a7f5eSAndroid Build Coastguard Worker method public boolean supportsAidPrefixRegistration(); 200*344a7f5eSAndroid Build Coastguard Worker method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean unsetOffHostForService(@NonNull android.content.ComponentName); 201*344a7f5eSAndroid Build Coastguard Worker method public boolean unsetPreferredService(android.app.Activity); 202*344a7f5eSAndroid Build Coastguard Worker field @Deprecated public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; 203*344a7f5eSAndroid Build Coastguard Worker field public static final String CATEGORY_OTHER = "other"; 204*344a7f5eSAndroid Build Coastguard Worker field public static final String CATEGORY_PAYMENT = "payment"; 205*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_CATEGORY = "category"; 206*344a7f5eSAndroid Build Coastguard Worker field public static final String EXTRA_SERVICE_COMPONENT = "component"; 207*344a7f5eSAndroid Build Coastguard Worker field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1 208*344a7f5eSAndroid Build Coastguard Worker field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2 209*344a7f5eSAndroid Build Coastguard Worker field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0 210*344a7f5eSAndroid Build Coastguard Worker } 211*344a7f5eSAndroid Build Coastguard Worker 212*344a7f5eSAndroid Build Coastguard Worker public abstract class HostApduService extends android.app.Service { 213*344a7f5eSAndroid Build Coastguard Worker ctor public HostApduService(); 214*344a7f5eSAndroid Build Coastguard Worker method public final void notifyUnhandled(); 215*344a7f5eSAndroid Build Coastguard Worker method public final android.os.IBinder onBind(android.content.Intent); 216*344a7f5eSAndroid Build Coastguard Worker method public abstract void onDeactivated(int); 217*344a7f5eSAndroid Build Coastguard Worker method public abstract byte[] processCommandApdu(byte[], android.os.Bundle); 218*344a7f5eSAndroid Build Coastguard Worker method public void processPollingFrames(@NonNull java.util.List<android.nfc.cardemulation.PollingFrame>); 219*344a7f5eSAndroid Build Coastguard Worker method public final void sendResponseApdu(byte[]); 220*344a7f5eSAndroid Build Coastguard Worker field public static final int DEACTIVATION_DESELECTED = 1; // 0x1 221*344a7f5eSAndroid Build Coastguard Worker field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 222*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_APDU_SERVICE"; 223*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service"; 224*344a7f5eSAndroid Build Coastguard Worker } 225*344a7f5eSAndroid Build Coastguard Worker 226*344a7f5eSAndroid Build Coastguard Worker public abstract class HostNfcFService extends android.app.Service { 227*344a7f5eSAndroid Build Coastguard Worker ctor public HostNfcFService(); 228*344a7f5eSAndroid Build Coastguard Worker method public final android.os.IBinder onBind(android.content.Intent); 229*344a7f5eSAndroid Build Coastguard Worker method public abstract void onDeactivated(int); 230*344a7f5eSAndroid Build Coastguard Worker method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle); 231*344a7f5eSAndroid Build Coastguard Worker method public final void sendResponsePacket(byte[]); 232*344a7f5eSAndroid Build Coastguard Worker field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 233*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE"; 234*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service"; 235*344a7f5eSAndroid Build Coastguard Worker } 236*344a7f5eSAndroid Build Coastguard Worker 237*344a7f5eSAndroid Build Coastguard Worker public final class NfcFCardEmulation { 238*344a7f5eSAndroid Build Coastguard Worker method public boolean disableService(android.app.Activity) throws java.lang.RuntimeException; 239*344a7f5eSAndroid Build Coastguard Worker method public boolean enableService(android.app.Activity, android.content.ComponentName) throws java.lang.RuntimeException; 240*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter); 241*344a7f5eSAndroid Build Coastguard Worker method public String getNfcid2ForService(android.content.ComponentName) throws java.lang.RuntimeException; 242*344a7f5eSAndroid Build Coastguard Worker method public String getSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; 243*344a7f5eSAndroid Build Coastguard Worker method public boolean registerSystemCodeForService(android.content.ComponentName, String) throws java.lang.RuntimeException; 244*344a7f5eSAndroid Build Coastguard Worker method public boolean setNfcid2ForService(android.content.ComponentName, String) throws java.lang.RuntimeException; 245*344a7f5eSAndroid Build Coastguard Worker method public boolean unregisterSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; 246*344a7f5eSAndroid Build Coastguard Worker } 247*344a7f5eSAndroid Build Coastguard Worker 248*344a7f5eSAndroid Build Coastguard Worker public abstract class OffHostApduService extends android.app.Service { 249*344a7f5eSAndroid Build Coastguard Worker ctor public OffHostApduService(); 250*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE"; 251*344a7f5eSAndroid Build Coastguard Worker field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.off_host_apdu_service"; 252*344a7f5eSAndroid Build Coastguard Worker } 253*344a7f5eSAndroid Build Coastguard Worker 254*344a7f5eSAndroid Build Coastguard Worker public final class PollingFrame implements android.os.Parcelable { 255*344a7f5eSAndroid Build Coastguard Worker method public int describeContents(); 256*344a7f5eSAndroid Build Coastguard Worker method @NonNull public byte[] getData(); 257*344a7f5eSAndroid Build Coastguard Worker method public long getTimestamp(); 258*344a7f5eSAndroid Build Coastguard Worker method public boolean getTriggeredAutoTransact(); 259*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 260*344a7f5eSAndroid Build Coastguard Worker method public int getVendorSpecificGain(); 261*344a7f5eSAndroid Build Coastguard Worker method public void writeToParcel(@NonNull android.os.Parcel, int); 262*344a7f5eSAndroid Build Coastguard Worker field @NonNull public static final android.os.Parcelable.Creator<android.nfc.cardemulation.PollingFrame> CREATOR; 263*344a7f5eSAndroid Build Coastguard Worker field public static final int POLLING_LOOP_TYPE_A = 65; // 0x41 264*344a7f5eSAndroid Build Coastguard Worker field public static final int POLLING_LOOP_TYPE_B = 66; // 0x42 265*344a7f5eSAndroid Build Coastguard Worker field public static final int POLLING_LOOP_TYPE_F = 70; // 0x46 266*344a7f5eSAndroid Build Coastguard Worker field public static final int POLLING_LOOP_TYPE_OFF = 88; // 0x58 267*344a7f5eSAndroid Build Coastguard Worker field public static final int POLLING_LOOP_TYPE_ON = 79; // 0x4f 268*344a7f5eSAndroid Build Coastguard Worker field public static final int POLLING_LOOP_TYPE_UNKNOWN = 85; // 0x55 269*344a7f5eSAndroid Build Coastguard Worker } 270*344a7f5eSAndroid Build Coastguard Worker 271*344a7f5eSAndroid Build Coastguard Worker} 272*344a7f5eSAndroid Build Coastguard Worker 273*344a7f5eSAndroid Build Coastguard Workerpackage android.nfc.tech { 274*344a7f5eSAndroid Build Coastguard Worker 275*344a7f5eSAndroid Build Coastguard Worker public final class IsoDep implements android.nfc.tech.TagTechnology { 276*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 277*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 278*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.IsoDep get(android.nfc.Tag); 279*344a7f5eSAndroid Build Coastguard Worker method public byte[] getHiLayerResponse(); 280*344a7f5eSAndroid Build Coastguard Worker method public byte[] getHistoricalBytes(); 281*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 282*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 283*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 284*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 285*344a7f5eSAndroid Build Coastguard Worker method public boolean isExtendedLengthApduSupported(); 286*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 287*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 288*344a7f5eSAndroid Build Coastguard Worker } 289*344a7f5eSAndroid Build Coastguard Worker 290*344a7f5eSAndroid Build Coastguard Worker public final class MifareClassic implements android.nfc.tech.TagTechnology { 291*344a7f5eSAndroid Build Coastguard Worker method public boolean authenticateSectorWithKeyA(int, byte[]) throws java.io.IOException; 292*344a7f5eSAndroid Build Coastguard Worker method public boolean authenticateSectorWithKeyB(int, byte[]) throws java.io.IOException; 293*344a7f5eSAndroid Build Coastguard Worker method public int blockToSector(int); 294*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 295*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 296*344a7f5eSAndroid Build Coastguard Worker method public void decrement(int, int) throws java.io.IOException; 297*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.MifareClassic get(android.nfc.Tag); 298*344a7f5eSAndroid Build Coastguard Worker method public int getBlockCount(); 299*344a7f5eSAndroid Build Coastguard Worker method public int getBlockCountInSector(int); 300*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 301*344a7f5eSAndroid Build Coastguard Worker method public int getSectorCount(); 302*344a7f5eSAndroid Build Coastguard Worker method public int getSize(); 303*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 304*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 305*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 306*344a7f5eSAndroid Build Coastguard Worker method public void increment(int, int) throws java.io.IOException; 307*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 308*344a7f5eSAndroid Build Coastguard Worker method public byte[] readBlock(int) throws java.io.IOException; 309*344a7f5eSAndroid Build Coastguard Worker method public void restore(int) throws java.io.IOException; 310*344a7f5eSAndroid Build Coastguard Worker method public int sectorToBlock(int); 311*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 312*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 313*344a7f5eSAndroid Build Coastguard Worker method public void transfer(int) throws java.io.IOException; 314*344a7f5eSAndroid Build Coastguard Worker method public void writeBlock(int, byte[]) throws java.io.IOException; 315*344a7f5eSAndroid Build Coastguard Worker field public static final int BLOCK_SIZE = 16; // 0x10 316*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] KEY_DEFAULT; 317*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY; 318*344a7f5eSAndroid Build Coastguard Worker field public static final byte[] KEY_NFC_FORUM; 319*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_1K = 1024; // 0x400 320*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_2K = 2048; // 0x800 321*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_4K = 4096; // 0x1000 322*344a7f5eSAndroid Build Coastguard Worker field public static final int SIZE_MINI = 320; // 0x140 323*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_CLASSIC = 0; // 0x0 324*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_PLUS = 1; // 0x1 325*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_PRO = 2; // 0x2 326*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNKNOWN = -1; // 0xffffffff 327*344a7f5eSAndroid Build Coastguard Worker } 328*344a7f5eSAndroid Build Coastguard Worker 329*344a7f5eSAndroid Build Coastguard Worker public final class MifareUltralight implements android.nfc.tech.TagTechnology { 330*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 331*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 332*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.MifareUltralight get(android.nfc.Tag); 333*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 334*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 335*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 336*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 337*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 338*344a7f5eSAndroid Build Coastguard Worker method public byte[] readPages(int) throws java.io.IOException; 339*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 340*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 341*344a7f5eSAndroid Build Coastguard Worker method public void writePage(int, byte[]) throws java.io.IOException; 342*344a7f5eSAndroid Build Coastguard Worker field public static final int PAGE_SIZE = 4; // 0x4 343*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_ULTRALIGHT = 1; // 0x1 344*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_ULTRALIGHT_C = 2; // 0x2 345*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNKNOWN = -1; // 0xffffffff 346*344a7f5eSAndroid Build Coastguard Worker } 347*344a7f5eSAndroid Build Coastguard Worker 348*344a7f5eSAndroid Build Coastguard Worker public final class Ndef implements android.nfc.tech.TagTechnology { 349*344a7f5eSAndroid Build Coastguard Worker method public boolean canMakeReadOnly(); 350*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 351*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 352*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.Ndef get(android.nfc.Tag); 353*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NdefMessage getCachedNdefMessage(); 354*344a7f5eSAndroid Build Coastguard Worker method public int getMaxSize(); 355*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.NdefMessage getNdefMessage() throws android.nfc.FormatException, java.io.IOException; 356*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 357*344a7f5eSAndroid Build Coastguard Worker method public String getType(); 358*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 359*344a7f5eSAndroid Build Coastguard Worker method public boolean isWritable(); 360*344a7f5eSAndroid Build Coastguard Worker method public boolean makeReadOnly() throws java.io.IOException; 361*344a7f5eSAndroid Build Coastguard Worker method public void writeNdefMessage(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; 362*344a7f5eSAndroid Build Coastguard Worker field public static final String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic"; 363*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1"; 364*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2"; 365*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3"; 366*344a7f5eSAndroid Build Coastguard Worker field public static final String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4"; 367*344a7f5eSAndroid Build Coastguard Worker } 368*344a7f5eSAndroid Build Coastguard Worker 369*344a7f5eSAndroid Build Coastguard Worker public final class NdefFormatable implements android.nfc.tech.TagTechnology { 370*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 371*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 372*344a7f5eSAndroid Build Coastguard Worker method public void format(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; 373*344a7f5eSAndroid Build Coastguard Worker method public void formatReadOnly(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; 374*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NdefFormatable get(android.nfc.Tag); 375*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 376*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 377*344a7f5eSAndroid Build Coastguard Worker } 378*344a7f5eSAndroid Build Coastguard Worker 379*344a7f5eSAndroid Build Coastguard Worker public final class NfcA implements android.nfc.tech.TagTechnology { 380*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 381*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 382*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcA get(android.nfc.Tag); 383*344a7f5eSAndroid Build Coastguard Worker method public byte[] getAtqa(); 384*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 385*344a7f5eSAndroid Build Coastguard Worker method public short getSak(); 386*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 387*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 388*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 389*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 390*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 391*344a7f5eSAndroid Build Coastguard Worker } 392*344a7f5eSAndroid Build Coastguard Worker 393*344a7f5eSAndroid Build Coastguard Worker public final class NfcB implements android.nfc.tech.TagTechnology { 394*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 395*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 396*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcB get(android.nfc.Tag); 397*344a7f5eSAndroid Build Coastguard Worker method public byte[] getApplicationData(); 398*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 399*344a7f5eSAndroid Build Coastguard Worker method public byte[] getProtocolInfo(); 400*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 401*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 402*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 403*344a7f5eSAndroid Build Coastguard Worker } 404*344a7f5eSAndroid Build Coastguard Worker 405*344a7f5eSAndroid Build Coastguard Worker public final class NfcBarcode implements android.nfc.tech.TagTechnology { 406*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 407*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 408*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag); 409*344a7f5eSAndroid Build Coastguard Worker method public byte[] getBarcode(); 410*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 411*344a7f5eSAndroid Build Coastguard Worker method public int getType(); 412*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 413*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_KOVIO = 1; // 0x1 414*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_UNKNOWN = -1; // 0xffffffff 415*344a7f5eSAndroid Build Coastguard Worker } 416*344a7f5eSAndroid Build Coastguard Worker 417*344a7f5eSAndroid Build Coastguard Worker public final class NfcF implements android.nfc.tech.TagTechnology { 418*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 419*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 420*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcF get(android.nfc.Tag); 421*344a7f5eSAndroid Build Coastguard Worker method public byte[] getManufacturer(); 422*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 423*344a7f5eSAndroid Build Coastguard Worker method public byte[] getSystemCode(); 424*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 425*344a7f5eSAndroid Build Coastguard Worker method public int getTimeout(); 426*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 427*344a7f5eSAndroid Build Coastguard Worker method public void setTimeout(int); 428*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 429*344a7f5eSAndroid Build Coastguard Worker } 430*344a7f5eSAndroid Build Coastguard Worker 431*344a7f5eSAndroid Build Coastguard Worker public final class NfcV implements android.nfc.tech.TagTechnology { 432*344a7f5eSAndroid Build Coastguard Worker method public void close() throws java.io.IOException; 433*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 434*344a7f5eSAndroid Build Coastguard Worker method public static android.nfc.tech.NfcV get(android.nfc.Tag); 435*344a7f5eSAndroid Build Coastguard Worker method public byte getDsfId(); 436*344a7f5eSAndroid Build Coastguard Worker method public int getMaxTransceiveLength(); 437*344a7f5eSAndroid Build Coastguard Worker method public byte getResponseFlags(); 438*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 439*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 440*344a7f5eSAndroid Build Coastguard Worker method public byte[] transceive(byte[]) throws java.io.IOException; 441*344a7f5eSAndroid Build Coastguard Worker } 442*344a7f5eSAndroid Build Coastguard Worker 443*344a7f5eSAndroid Build Coastguard Worker public interface TagTechnology extends java.io.Closeable { 444*344a7f5eSAndroid Build Coastguard Worker method public void connect() throws java.io.IOException; 445*344a7f5eSAndroid Build Coastguard Worker method public android.nfc.Tag getTag(); 446*344a7f5eSAndroid Build Coastguard Worker method public boolean isConnected(); 447*344a7f5eSAndroid Build Coastguard Worker } 448*344a7f5eSAndroid Build Coastguard Worker 449*344a7f5eSAndroid Build Coastguard Worker} 450*344a7f5eSAndroid Build Coastguard Worker 451