Roshan Pius | 354b10b | 2023-11-14 14:30:26 -0800 | [diff] [blame] | 1 | // Signature format: 2.0 |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 2 | package android.nfc { |
| 3 | |
| 4 | public final class AvailableNfcAntenna implements android.os.Parcelable { |
| 5 | ctor public AvailableNfcAntenna(int, int); |
| 6 | method public int describeContents(); |
| 7 | method public int getLocationX(); |
| 8 | method public int getLocationY(); |
| 9 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 10 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.AvailableNfcAntenna> CREATOR; |
| 11 | } |
| 12 | |
| 13 | public class FormatException extends java.lang.Exception { |
| 14 | ctor public FormatException(); |
| 15 | ctor public FormatException(String); |
| 16 | ctor public FormatException(String, Throwable); |
| 17 | } |
| 18 | |
| 19 | public final class NdefMessage implements android.os.Parcelable { |
| 20 | ctor public NdefMessage(byte[]) throws android.nfc.FormatException; |
| 21 | ctor public NdefMessage(android.nfc.NdefRecord, android.nfc.NdefRecord...); |
| 22 | ctor public NdefMessage(android.nfc.NdefRecord[]); |
| 23 | method public int describeContents(); |
| 24 | method public int getByteArrayLength(); |
| 25 | method public android.nfc.NdefRecord[] getRecords(); |
| 26 | method public byte[] toByteArray(); |
| 27 | method public void writeToParcel(android.os.Parcel, int); |
| 28 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefMessage> CREATOR; |
| 29 | } |
| 30 | |
| 31 | public final class NdefRecord implements android.os.Parcelable { |
| 32 | ctor public NdefRecord(short, byte[], byte[], byte[]); |
| 33 | ctor @Deprecated public NdefRecord(byte[]) throws android.nfc.FormatException; |
| 34 | method public static android.nfc.NdefRecord createApplicationRecord(String); |
| 35 | method public static android.nfc.NdefRecord createExternal(String, String, byte[]); |
| 36 | method public static android.nfc.NdefRecord createMime(String, byte[]); |
| 37 | method public static android.nfc.NdefRecord createTextRecord(String, String); |
| 38 | method public static android.nfc.NdefRecord createUri(android.net.Uri); |
| 39 | method public static android.nfc.NdefRecord createUri(String); |
| 40 | method public int describeContents(); |
| 41 | method public byte[] getId(); |
| 42 | method public byte[] getPayload(); |
| 43 | method public short getTnf(); |
| 44 | method public byte[] getType(); |
| 45 | method @Deprecated public byte[] toByteArray(); |
| 46 | method public String toMimeType(); |
| 47 | method public android.net.Uri toUri(); |
| 48 | method public void writeToParcel(android.os.Parcel, int); |
| 49 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefRecord> CREATOR; |
| 50 | field public static final byte[] RTD_ALTERNATIVE_CARRIER; |
| 51 | field public static final byte[] RTD_HANDOVER_CARRIER; |
| 52 | field public static final byte[] RTD_HANDOVER_REQUEST; |
| 53 | field public static final byte[] RTD_HANDOVER_SELECT; |
| 54 | field public static final byte[] RTD_SMART_POSTER; |
| 55 | field public static final byte[] RTD_TEXT; |
| 56 | field public static final byte[] RTD_URI; |
| 57 | field public static final short TNF_ABSOLUTE_URI = 3; // 0x3 |
| 58 | field public static final short TNF_EMPTY = 0; // 0x0 |
| 59 | field public static final short TNF_EXTERNAL_TYPE = 4; // 0x4 |
| 60 | field public static final short TNF_MIME_MEDIA = 2; // 0x2 |
| 61 | field public static final short TNF_UNCHANGED = 6; // 0x6 |
| 62 | field public static final short TNF_UNKNOWN = 5; // 0x5 |
| 63 | field public static final short TNF_WELL_KNOWN = 1; // 0x1 |
| 64 | } |
| 65 | |
| 66 | public final class NfcAdapter { |
ziyiw | f561b86 | 2024-05-01 23:15:05 +0000 | [diff] [blame] | 67 | method @FlaggedApi("android.nfc.nfc_state_change") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 68 | method public void disableForegroundDispatch(android.app.Activity); |
| 69 | method public void disableReaderMode(android.app.Activity); |
ziyiw | f561b86 | 2024-05-01 23:15:05 +0000 | [diff] [blame] | 70 | method @FlaggedApi("android.nfc.nfc_state_change") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 71 | method public void enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]); |
| 72 | method public void enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle); |
| 73 | method public static android.nfc.NfcAdapter getDefaultAdapter(android.content.Context); |
| 74 | method @Nullable public android.nfc.NfcAntennaInfo getNfcAntennaInfo(); |
Jack Yu | dc872e0 | 2024-01-09 09:40:40 +0000 | [diff] [blame] | 75 | method @FlaggedApi("android.nfc.enable_nfc_charging") @Nullable public android.nfc.WlcListenerDeviceInfo getWlcListenerDeviceInfo(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 76 | method public boolean ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler); |
| 77 | method public boolean isEnabled(); |
Brad Lassey | ee03676a | 2024-01-27 14:29:51 -0500 | [diff] [blame] | 78 | method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean isObserveModeEnabled(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 79 | method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean isObserveModeSupported(); |
| 80 | method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionEnabled(); |
| 81 | method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionSupported(); |
| 82 | method public boolean isSecureNfcEnabled(); |
| 83 | method public boolean isSecureNfcSupported(); |
| 84 | method @FlaggedApi("android.nfc.enable_nfc_charging") public boolean isWlcEnabled(); |
| 85 | method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void resetDiscoveryTechnology(@NonNull android.app.Activity); |
| 86 | method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void setDiscoveryTechnology(@NonNull android.app.Activity, int, int); |
Brad Lassey | 82abaf1 | 2024-02-21 00:06:16 -0500 | [diff] [blame] | 87 | method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean setObserveModeEnabled(boolean); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 88 | field public static final String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED"; |
| 89 | field public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED"; |
| 90 | field @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static final String ACTION_PREFERRED_PAYMENT_CHANGED = "android.nfc.action.PREFERRED_PAYMENT_CHANGED"; |
| 91 | field public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED"; |
| 92 | field public static final String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED"; |
| 93 | field @RequiresPermission(android.Manifest.permission.NFC_TRANSACTION_EVENT) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; |
| 94 | field public static final String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE"; |
| 95 | field public static final String EXTRA_AID = "android.nfc.extra.AID"; |
| 96 | field public static final String EXTRA_DATA = "android.nfc.extra.DATA"; |
| 97 | field public static final String EXTRA_ID = "android.nfc.extra.ID"; |
| 98 | field public static final String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES"; |
| 99 | field public static final String EXTRA_PREFERRED_PAYMENT_CHANGED_REASON = "android.nfc.extra.PREFERRED_PAYMENT_CHANGED_REASON"; |
| 100 | field public static final String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence"; |
| 101 | field public static final String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME"; |
| 102 | field public static final String EXTRA_TAG = "android.nfc.extra.TAG"; |
| 103 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_DISABLE = 0; // 0x0 |
Alisher Alikhodjaev | c867314 | 2024-01-31 14:18:00 -0800 | [diff] [blame] | 104 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_KEEP = -2147483648; // 0x80000000 |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 105 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_A = 1; // 0x1 |
| 106 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_B = 2; // 0x2 |
| 107 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_F = 4; // 0x4 |
| 108 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_READER_DISABLE = 0; // 0x0 |
Alisher Alikhodjaev | c867314 | 2024-01-31 14:18:00 -0800 | [diff] [blame] | 109 | field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_READER_KEEP = -2147483648; // 0x80000000 |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 110 | field public static final int FLAG_READER_NFC_A = 1; // 0x1 |
| 111 | field public static final int FLAG_READER_NFC_B = 2; // 0x2 |
| 112 | field public static final int FLAG_READER_NFC_BARCODE = 16; // 0x10 |
| 113 | field public static final int FLAG_READER_NFC_F = 4; // 0x4 |
| 114 | field public static final int FLAG_READER_NFC_V = 8; // 0x8 |
| 115 | field public static final int FLAG_READER_NO_PLATFORM_SOUNDS = 256; // 0x100 |
| 116 | field public static final int FLAG_READER_SKIP_NDEF_CHECK = 128; // 0x80 |
| 117 | field public static final int PREFERRED_PAYMENT_CHANGED = 2; // 0x2 |
| 118 | field public static final int PREFERRED_PAYMENT_LOADED = 1; // 0x1 |
| 119 | field public static final int PREFERRED_PAYMENT_UPDATED = 3; // 0x3 |
| 120 | field public static final int STATE_OFF = 1; // 0x1 |
| 121 | field public static final int STATE_ON = 3; // 0x3 |
| 122 | field public static final int STATE_TURNING_OFF = 4; // 0x4 |
| 123 | field public static final int STATE_TURNING_ON = 2; // 0x2 |
| 124 | } |
| 125 | |
| 126 | @Deprecated public static interface NfcAdapter.CreateBeamUrisCallback { |
| 127 | method @Deprecated public android.net.Uri[] createBeamUris(android.nfc.NfcEvent); |
| 128 | } |
| 129 | |
| 130 | @Deprecated public static interface NfcAdapter.CreateNdefMessageCallback { |
| 131 | method @Deprecated public android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent); |
| 132 | } |
| 133 | |
| 134 | @Deprecated public static interface NfcAdapter.OnNdefPushCompleteCallback { |
| 135 | method @Deprecated public void onNdefPushComplete(android.nfc.NfcEvent); |
| 136 | } |
| 137 | |
| 138 | public static interface NfcAdapter.OnTagRemovedListener { |
| 139 | method public void onTagRemoved(); |
| 140 | } |
| 141 | |
| 142 | public static interface NfcAdapter.ReaderCallback { |
| 143 | method public void onTagDiscovered(android.nfc.Tag); |
| 144 | } |
| 145 | |
| 146 | public final class NfcAntennaInfo implements android.os.Parcelable { |
| 147 | ctor public NfcAntennaInfo(int, int, boolean, @NonNull java.util.List<android.nfc.AvailableNfcAntenna>); |
| 148 | method public int describeContents(); |
| 149 | method @NonNull public java.util.List<android.nfc.AvailableNfcAntenna> getAvailableNfcAntennas(); |
| 150 | method public int getDeviceHeight(); |
| 151 | method public int getDeviceWidth(); |
| 152 | method public boolean isDeviceFoldable(); |
| 153 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 154 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NfcAntennaInfo> CREATOR; |
| 155 | } |
| 156 | |
| 157 | public final class NfcEvent { |
| 158 | field public final android.nfc.NfcAdapter nfcAdapter; |
| 159 | field public final int peerLlcpMajorVersion; |
| 160 | field public final int peerLlcpMinorVersion; |
| 161 | } |
| 162 | |
| 163 | public final class NfcManager { |
| 164 | method public android.nfc.NfcAdapter getDefaultAdapter(); |
| 165 | } |
| 166 | |
| 167 | public final class Tag implements android.os.Parcelable { |
| 168 | method public int describeContents(); |
| 169 | method public byte[] getId(); |
| 170 | method public String[] getTechList(); |
| 171 | method public void writeToParcel(android.os.Parcel, int); |
| 172 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.Tag> CREATOR; |
| 173 | } |
| 174 | |
| 175 | public class TagLostException extends java.io.IOException { |
| 176 | ctor public TagLostException(); |
| 177 | ctor public TagLostException(String); |
| 178 | } |
| 179 | |
Jack Yu | dc872e0 | 2024-01-09 09:40:40 +0000 | [diff] [blame] | 180 | @FlaggedApi("android.nfc.enable_nfc_charging") public final class WlcListenerDeviceInfo implements android.os.Parcelable { |
| 181 | ctor public WlcListenerDeviceInfo(int, double, double, int); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 182 | method public int describeContents(); |
Jack Yu | dc872e0 | 2024-01-09 09:40:40 +0000 | [diff] [blame] | 183 | method @FloatRange(from=0.0, to=100.0) public double getBatteryLevel(); |
| 184 | method public int getProductId(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 185 | method public int getState(); |
| 186 | method public double getTemperature(); |
| 187 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
Jack Yu | dc872e0 | 2024-01-09 09:40:40 +0000 | [diff] [blame] | 188 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.WlcListenerDeviceInfo> CREATOR; |
| 189 | field public static final int STATE_CONNECTED_CHARGING = 2; // 0x2 |
| 190 | field public static final int STATE_CONNECTED_DISCHARGING = 3; // 0x3 |
| 191 | field public static final int STATE_DISCONNECTED = 1; // 0x1 |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | } |
| 195 | |
| 196 | package android.nfc.cardemulation { |
| 197 | |
| 198 | public final class CardEmulation { |
James Willcox | 82e3148 | 2024-03-22 18:06:00 +0000 | [diff] [blame] | 199 | method public boolean categoryAllowsForegroundPreference(String); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 200 | method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public java.util.List<java.lang.String> getAidsForPreferredPaymentService(); |
| 201 | method public java.util.List<java.lang.String> getAidsForService(android.content.ComponentName, String); |
James Willcox | 82e3148 | 2024-03-22 18:06:00 +0000 | [diff] [blame] | 202 | method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public CharSequence getDescriptionForPreferredPaymentService(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 203 | method public static android.nfc.cardemulation.CardEmulation getInstance(android.nfc.NfcAdapter); |
James Willcox | 82e3148 | 2024-03-22 18:06:00 +0000 | [diff] [blame] | 204 | method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public String getRouteDestinationForPreferredPaymentService(); |
| 205 | method public int getSelectionModeForCategory(String); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 206 | method public boolean isDefaultServiceForAid(android.content.ComponentName, String); |
| 207 | method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); |
Roshan | c72a1f6 | 2024-09-06 09:46:03 -0700 | [diff] [blame^] | 208 | method @FlaggedApi("android.nfc.enable_card_emulation_euicc") public boolean isEuiccSupported(); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 209 | method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); |
Brad Lassey | 07054da | 2024-02-22 15:17:09 -0500 | [diff] [blame] | 210 | method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean registerPollingLoopFilterForService(@NonNull android.content.ComponentName, @NonNull String, boolean); |
Brad Lassey | f3214de | 2024-03-12 21:27:17 +0000 | [diff] [blame] | 211 | method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean registerPollingLoopPatternFilterForService(@NonNull android.content.ComponentName, @NonNull String, boolean); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 212 | method public boolean removeAidsForService(android.content.ComponentName, String); |
Brad Lassey | f3214de | 2024-03-12 21:27:17 +0000 | [diff] [blame] | 213 | method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean removePollingLoopFilterForService(@NonNull android.content.ComponentName, @NonNull String); |
| 214 | method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean removePollingLoopPatternFilterForService(@NonNull android.content.ComponentName, @NonNull String); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 215 | method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); |
| 216 | method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); |
Brad Lassey | 776bb06 | 2024-02-26 14:59:47 -0500 | [diff] [blame] | 217 | method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean setShouldDefaultToObserveModeForService(@NonNull android.content.ComponentName, boolean); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 218 | method public boolean supportsAidPrefixRegistration(); |
| 219 | method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean unsetOffHostForService(@NonNull android.content.ComponentName); |
| 220 | method public boolean unsetPreferredService(android.app.Activity); |
| 221 | field @Deprecated public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; |
| 222 | field public static final String CATEGORY_OTHER = "other"; |
| 223 | field public static final String CATEGORY_PAYMENT = "payment"; |
| 224 | field public static final String EXTRA_CATEGORY = "category"; |
| 225 | field public static final String EXTRA_SERVICE_COMPONENT = "component"; |
ziyiw | 2d05ad4 | 2024-08-23 18:18:04 +0000 | [diff] [blame] | 226 | field @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public static final int PROTOCOL_AND_TECHNOLOGY_ROUTE_DH = 0; // 0x0 |
| 227 | field @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public static final int PROTOCOL_AND_TECHNOLOGY_ROUTE_ESE = 1; // 0x1 |
| 228 | field @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public static final int PROTOCOL_AND_TECHNOLOGY_ROUTE_UICC = 2; // 0x2 |
| 229 | field @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public static final int PROTOCOL_AND_TECHNOLOGY_ROUTE_UNSET = -1; // 0xffffffff |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 230 | field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1 |
| 231 | field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2 |
| 232 | field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0 |
| 233 | } |
| 234 | |
| 235 | public abstract class HostApduService extends android.app.Service { |
| 236 | ctor public HostApduService(); |
| 237 | method public final void notifyUnhandled(); |
| 238 | method public final android.os.IBinder onBind(android.content.Intent); |
| 239 | method public abstract void onDeactivated(int); |
Brad Lassey | f440009 | 2024-08-09 21:36:15 +0000 | [diff] [blame] | 240 | method @FlaggedApi("android.nfc.nfc_event_listener") public void onObserveModeStateChanged(boolean); |
| 241 | method @FlaggedApi("android.nfc.nfc_event_listener") public void onPreferredServiceChanged(boolean); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 242 | method public abstract byte[] processCommandApdu(byte[], android.os.Bundle); |
Brad Lassey | 5dd2944 | 2024-02-16 00:02:52 -0500 | [diff] [blame] | 243 | method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void processPollingFrames(@NonNull java.util.List<android.nfc.cardemulation.PollingFrame>); |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 244 | method public final void sendResponseApdu(byte[]); |
| 245 | field public static final int DEACTIVATION_DESELECTED = 1; // 0x1 |
| 246 | field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 247 | field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_APDU_SERVICE"; |
| 248 | field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service"; |
| 249 | } |
| 250 | |
| 251 | public abstract class HostNfcFService extends android.app.Service { |
| 252 | ctor public HostNfcFService(); |
| 253 | method public final android.os.IBinder onBind(android.content.Intent); |
| 254 | method public abstract void onDeactivated(int); |
| 255 | method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle); |
| 256 | method public final void sendResponsePacket(byte[]); |
| 257 | field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 |
| 258 | field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE"; |
| 259 | field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service"; |
| 260 | } |
| 261 | |
| 262 | public final class NfcFCardEmulation { |
| 263 | method public boolean disableService(android.app.Activity) throws java.lang.RuntimeException; |
| 264 | method public boolean enableService(android.app.Activity, android.content.ComponentName) throws java.lang.RuntimeException; |
| 265 | method public static android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter); |
| 266 | method public String getNfcid2ForService(android.content.ComponentName) throws java.lang.RuntimeException; |
| 267 | method public String getSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; |
| 268 | method public boolean registerSystemCodeForService(android.content.ComponentName, String) throws java.lang.RuntimeException; |
| 269 | method public boolean setNfcid2ForService(android.content.ComponentName, String) throws java.lang.RuntimeException; |
| 270 | method public boolean unregisterSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; |
| 271 | } |
| 272 | |
| 273 | public abstract class OffHostApduService extends android.app.Service { |
| 274 | ctor public OffHostApduService(); |
| 275 | field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE"; |
| 276 | field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.off_host_apdu_service"; |
| 277 | } |
| 278 | |
Brad Lassey | 5dd2944 | 2024-02-16 00:02:52 -0500 | [diff] [blame] | 279 | @FlaggedApi("android.nfc.nfc_read_polling_loop") public final class PollingFrame implements android.os.Parcelable { |
Brad Lassey | 5dd2944 | 2024-02-16 00:02:52 -0500 | [diff] [blame] | 280 | method public int describeContents(); |
| 281 | method @NonNull public byte[] getData(); |
Brad Lassey | a805921 | 2024-03-18 18:16:27 -0400 | [diff] [blame] | 282 | method public long getTimestamp(); |
Brad Lassey | 19d5070 | 2024-03-04 20:04:03 +0000 | [diff] [blame] | 283 | method public boolean getTriggeredAutoTransact(); |
Brad Lassey | 6075bd2 | 2024-02-16 10:49:18 -0500 | [diff] [blame] | 284 | method public int getType(); |
Brad Lassey | 60e4a30 | 2024-03-05 01:16:53 +0000 | [diff] [blame] | 285 | method public int getVendorSpecificGain(); |
Brad Lassey | 5dd2944 | 2024-02-16 00:02:52 -0500 | [diff] [blame] | 286 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 287 | field @NonNull public static final android.os.Parcelable.Creator<android.nfc.cardemulation.PollingFrame> CREATOR; |
Brad Lassey | 6075bd2 | 2024-02-16 10:49:18 -0500 | [diff] [blame] | 288 | field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final int POLLING_LOOP_TYPE_A = 65; // 0x41 |
| 289 | field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final int POLLING_LOOP_TYPE_B = 66; // 0x42 |
| 290 | field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final int POLLING_LOOP_TYPE_F = 70; // 0x46 |
| 291 | field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final int POLLING_LOOP_TYPE_OFF = 88; // 0x58 |
| 292 | field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final int POLLING_LOOP_TYPE_ON = 79; // 0x4f |
| 293 | field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final int POLLING_LOOP_TYPE_UNKNOWN = 85; // 0x55 |
Brad Lassey | 5dd2944 | 2024-02-16 00:02:52 -0500 | [diff] [blame] | 294 | } |
| 295 | |
Roshan Pius | b5ff8cf | 2023-11-13 14:29:09 -0800 | [diff] [blame] | 296 | } |
| 297 | |
| 298 | package android.nfc.tech { |
| 299 | |
| 300 | public final class IsoDep implements android.nfc.tech.TagTechnology { |
| 301 | method public void close() throws java.io.IOException; |
| 302 | method public void connect() throws java.io.IOException; |
| 303 | method public static android.nfc.tech.IsoDep get(android.nfc.Tag); |
| 304 | method public byte[] getHiLayerResponse(); |
| 305 | method public byte[] getHistoricalBytes(); |
| 306 | method public int getMaxTransceiveLength(); |
| 307 | method public android.nfc.Tag getTag(); |
| 308 | method public int getTimeout(); |
| 309 | method public boolean isConnected(); |
| 310 | method public boolean isExtendedLengthApduSupported(); |
| 311 | method public void setTimeout(int); |
| 312 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 313 | } |
| 314 | |
| 315 | public final class MifareClassic implements android.nfc.tech.TagTechnology { |
| 316 | method public boolean authenticateSectorWithKeyA(int, byte[]) throws java.io.IOException; |
| 317 | method public boolean authenticateSectorWithKeyB(int, byte[]) throws java.io.IOException; |
| 318 | method public int blockToSector(int); |
| 319 | method public void close() throws java.io.IOException; |
| 320 | method public void connect() throws java.io.IOException; |
| 321 | method public void decrement(int, int) throws java.io.IOException; |
| 322 | method public static android.nfc.tech.MifareClassic get(android.nfc.Tag); |
| 323 | method public int getBlockCount(); |
| 324 | method public int getBlockCountInSector(int); |
| 325 | method public int getMaxTransceiveLength(); |
| 326 | method public int getSectorCount(); |
| 327 | method public int getSize(); |
| 328 | method public android.nfc.Tag getTag(); |
| 329 | method public int getTimeout(); |
| 330 | method public int getType(); |
| 331 | method public void increment(int, int) throws java.io.IOException; |
| 332 | method public boolean isConnected(); |
| 333 | method public byte[] readBlock(int) throws java.io.IOException; |
| 334 | method public void restore(int) throws java.io.IOException; |
| 335 | method public int sectorToBlock(int); |
| 336 | method public void setTimeout(int); |
| 337 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 338 | method public void transfer(int) throws java.io.IOException; |
| 339 | method public void writeBlock(int, byte[]) throws java.io.IOException; |
| 340 | field public static final int BLOCK_SIZE = 16; // 0x10 |
| 341 | field public static final byte[] KEY_DEFAULT; |
| 342 | field public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY; |
| 343 | field public static final byte[] KEY_NFC_FORUM; |
| 344 | field public static final int SIZE_1K = 1024; // 0x400 |
| 345 | field public static final int SIZE_2K = 2048; // 0x800 |
| 346 | field public static final int SIZE_4K = 4096; // 0x1000 |
| 347 | field public static final int SIZE_MINI = 320; // 0x140 |
| 348 | field public static final int TYPE_CLASSIC = 0; // 0x0 |
| 349 | field public static final int TYPE_PLUS = 1; // 0x1 |
| 350 | field public static final int TYPE_PRO = 2; // 0x2 |
| 351 | field public static final int TYPE_UNKNOWN = -1; // 0xffffffff |
| 352 | } |
| 353 | |
| 354 | public final class MifareUltralight implements android.nfc.tech.TagTechnology { |
| 355 | method public void close() throws java.io.IOException; |
| 356 | method public void connect() throws java.io.IOException; |
| 357 | method public static android.nfc.tech.MifareUltralight get(android.nfc.Tag); |
| 358 | method public int getMaxTransceiveLength(); |
| 359 | method public android.nfc.Tag getTag(); |
| 360 | method public int getTimeout(); |
| 361 | method public int getType(); |
| 362 | method public boolean isConnected(); |
| 363 | method public byte[] readPages(int) throws java.io.IOException; |
| 364 | method public void setTimeout(int); |
| 365 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 366 | method public void writePage(int, byte[]) throws java.io.IOException; |
| 367 | field public static final int PAGE_SIZE = 4; // 0x4 |
| 368 | field public static final int TYPE_ULTRALIGHT = 1; // 0x1 |
| 369 | field public static final int TYPE_ULTRALIGHT_C = 2; // 0x2 |
| 370 | field public static final int TYPE_UNKNOWN = -1; // 0xffffffff |
| 371 | } |
| 372 | |
| 373 | public final class Ndef implements android.nfc.tech.TagTechnology { |
| 374 | method public boolean canMakeReadOnly(); |
| 375 | method public void close() throws java.io.IOException; |
| 376 | method public void connect() throws java.io.IOException; |
| 377 | method public static android.nfc.tech.Ndef get(android.nfc.Tag); |
| 378 | method public android.nfc.NdefMessage getCachedNdefMessage(); |
| 379 | method public int getMaxSize(); |
| 380 | method public android.nfc.NdefMessage getNdefMessage() throws android.nfc.FormatException, java.io.IOException; |
| 381 | method public android.nfc.Tag getTag(); |
| 382 | method public String getType(); |
| 383 | method public boolean isConnected(); |
| 384 | method public boolean isWritable(); |
| 385 | method public boolean makeReadOnly() throws java.io.IOException; |
| 386 | method public void writeNdefMessage(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; |
| 387 | field public static final String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic"; |
| 388 | field public static final String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1"; |
| 389 | field public static final String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2"; |
| 390 | field public static final String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3"; |
| 391 | field public static final String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4"; |
| 392 | } |
| 393 | |
| 394 | public final class NdefFormatable implements android.nfc.tech.TagTechnology { |
| 395 | method public void close() throws java.io.IOException; |
| 396 | method public void connect() throws java.io.IOException; |
| 397 | method public void format(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; |
| 398 | method public void formatReadOnly(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; |
| 399 | method public static android.nfc.tech.NdefFormatable get(android.nfc.Tag); |
| 400 | method public android.nfc.Tag getTag(); |
| 401 | method public boolean isConnected(); |
| 402 | } |
| 403 | |
| 404 | public final class NfcA implements android.nfc.tech.TagTechnology { |
| 405 | method public void close() throws java.io.IOException; |
| 406 | method public void connect() throws java.io.IOException; |
| 407 | method public static android.nfc.tech.NfcA get(android.nfc.Tag); |
| 408 | method public byte[] getAtqa(); |
| 409 | method public int getMaxTransceiveLength(); |
| 410 | method public short getSak(); |
| 411 | method public android.nfc.Tag getTag(); |
| 412 | method public int getTimeout(); |
| 413 | method public boolean isConnected(); |
| 414 | method public void setTimeout(int); |
| 415 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 416 | } |
| 417 | |
| 418 | public final class NfcB implements android.nfc.tech.TagTechnology { |
| 419 | method public void close() throws java.io.IOException; |
| 420 | method public void connect() throws java.io.IOException; |
| 421 | method public static android.nfc.tech.NfcB get(android.nfc.Tag); |
| 422 | method public byte[] getApplicationData(); |
| 423 | method public int getMaxTransceiveLength(); |
| 424 | method public byte[] getProtocolInfo(); |
| 425 | method public android.nfc.Tag getTag(); |
| 426 | method public boolean isConnected(); |
| 427 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 428 | } |
| 429 | |
| 430 | public final class NfcBarcode implements android.nfc.tech.TagTechnology { |
| 431 | method public void close() throws java.io.IOException; |
| 432 | method public void connect() throws java.io.IOException; |
| 433 | method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag); |
| 434 | method public byte[] getBarcode(); |
| 435 | method public android.nfc.Tag getTag(); |
| 436 | method public int getType(); |
| 437 | method public boolean isConnected(); |
| 438 | field public static final int TYPE_KOVIO = 1; // 0x1 |
| 439 | field public static final int TYPE_UNKNOWN = -1; // 0xffffffff |
| 440 | } |
| 441 | |
| 442 | public final class NfcF implements android.nfc.tech.TagTechnology { |
| 443 | method public void close() throws java.io.IOException; |
| 444 | method public void connect() throws java.io.IOException; |
| 445 | method public static android.nfc.tech.NfcF get(android.nfc.Tag); |
| 446 | method public byte[] getManufacturer(); |
| 447 | method public int getMaxTransceiveLength(); |
| 448 | method public byte[] getSystemCode(); |
| 449 | method public android.nfc.Tag getTag(); |
| 450 | method public int getTimeout(); |
| 451 | method public boolean isConnected(); |
| 452 | method public void setTimeout(int); |
| 453 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 454 | } |
| 455 | |
| 456 | public final class NfcV implements android.nfc.tech.TagTechnology { |
| 457 | method public void close() throws java.io.IOException; |
| 458 | method public void connect() throws java.io.IOException; |
| 459 | method public static android.nfc.tech.NfcV get(android.nfc.Tag); |
| 460 | method public byte getDsfId(); |
| 461 | method public int getMaxTransceiveLength(); |
| 462 | method public byte getResponseFlags(); |
| 463 | method public android.nfc.Tag getTag(); |
| 464 | method public boolean isConnected(); |
| 465 | method public byte[] transceive(byte[]) throws java.io.IOException; |
| 466 | } |
| 467 | |
| 468 | public interface TagTechnology extends java.io.Closeable { |
| 469 | method public void connect() throws java.io.IOException; |
| 470 | method public android.nfc.Tag getTag(); |
| 471 | method public boolean isConnected(); |
| 472 | } |
| 473 | |
| 474 | } |
| 475 | |