16be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton/* 26be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * Copyright (C) 2010 The Android Open Source Project 36be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * 46be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * Licensed under the Apache License, Version 2.0 (the "License"); 56be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * you may not use this file except in compliance with the License. 66be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * You may obtain a copy of the License at 76be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * 86be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * http://www.apache.org/licenses/LICENSE-2.0 96be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * 106be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * Unless required by applicable law or agreed to in writing, software 116be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * distributed under the License is distributed on an "AS IS" BASIS, 126be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 136be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * See the License for the specific language governing permissions and 146be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton * limitations under the License. 156be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 166be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 174e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamiltonpackage android.nfc.tech; 186be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 196be655c768a82716612c00fdd156254d8dc00f42Jeff Hamiltonimport android.nfc.Tag; 206be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 213fcedf77286a078ebd7ac8c082365bd80703dfdcNick Pellyimport java.io.Closeable; 226be655c768a82716612c00fdd156254d8dc00f42Jeff Hamiltonimport java.io.IOException; 236be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 2474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly/** 2574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link TagTechnology} is an interface to a technology in a {@link Tag}. 2674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p> 2774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * Obtain a {@link TagTechnology} implementation by calling the static method <code>get()</code> 2874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * on the implementation class. 2974fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p> 3074fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * NFC tags are based on a number of independently developed technologies and offer a 3174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * wide range of capabilities. The 3274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link TagTechnology} implementations provide access to these different 3374fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * technologies and capabilities. Some sub-classes map to technology 3474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * specification (for example {@link NfcA}, {@link IsoDep}, others map to 3574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * pseudo-technologies or capabilities (for example {@link Ndef}, {@link NdefFormatable}). 3674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p> 3774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * It is mandatory for all Android NFC devices to provide the following 3874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link TagTechnology} implementations. 3974fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <ul> 4074fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link NfcA} (also known as ISO 14443-3A) 4174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link NfcB} (also known as ISO 14443-3B) 4274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link NfcF} (also known as JIS 6319-4) 4374fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link NfcV} (also known as ISO 15693) 4474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link IsoDep} 4574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link Ndef} on NFC Forum Type 1, Type 2, Type 3 or Type 4 compliant tags 4674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * </ul> 4774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * It is optional for Android NFC devices to provide the following 4874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link TagTechnology} implementations. If it is not provided, the 4974fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * Android device will never enumerate that class via {@link Tag#getTechList}. 5074fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <ul> 5174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link MifareClassic} 5274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link MifareUltralight} 537a6dfb2f7294bbfb5ebc4f937db97b659a447607Martijn Coenen * <li>{@link NfcBarcode} 5474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link NdefFormatable} must only be enumerated on tags for which this Android device 5574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * is capable of formatting. Proprietary knowledge is often required to format a tag 5674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * to make it NDEF compatible. 5774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * </ul> 5874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p> 5974fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link TagTechnology} implementations provide methods that fall into two classes: 6074fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <em>cached getters</em> and <em>I/O operations</em>. 6174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <h4>Cached getters</h4> 6274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * These methods (usually prefixed by <code>get</code> or <code>is</code>) return 6374fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * properties of the tag, as determined at discovery time. These methods will never 6474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * block or cause RF activity, and do not require {@link #connect} to have been called. 6574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * They also never update, for example if a property is changed by an I/O operation with a tag 6674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * then the cached getter will still return the result from tag discovery time. 6774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <h4>I/O operations</h4> 6874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * I/O operations may require RF activity, and may block. They have the following semantics. 6974fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <ul> 7074fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link #connect} must be called before using any other I/O operation. 7174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>{@link #close} must be called after completing I/O operations with a 7274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link TagTechnology}, and it will cancel all other blocked I/O operations on other threads 7374fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * (including {@link #connect} with {@link IOException}. 7474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>Only one {@link TagTechnology} can be connected at a time. Other calls to 7574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link #connect} will return {@link IOException}. 7674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <li>I/O operations may block, and should never be called on the main application 7774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * thread. 7874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * </ul> 7939cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * 8039cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * <p class="note"><strong>Note:</strong> Methods that perform I/O operations 8139cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * require the {@link android.Manifest.permission#NFC} permission. 8274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly */ 833fcedf77286a078ebd7ac8c082365bd80703dfdcNick Pellypublic interface TagTechnology extends Closeable { 846be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 85ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link NfcA}. 86ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 874e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 886be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 896be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton public static final int NFC_A = 1; 906be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 916be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 92ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link NfcB}. 93ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 944e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 956be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 966be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton public static final int NFC_B = 2; 976be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 986be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 99ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link IsoDep}. 100ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 1014e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 1026be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 1036be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton public static final int ISO_DEP = 3; 1046be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1056be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 106ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link NfcF}. 107ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 1084e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 1096be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 110641dd62155fd2eeddd93b2036154b13c05b70ba2Jeff Hamilton public static final int NFC_F = 4; 1116be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1126be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 113ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link NfcV}. 114ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 1154e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 1166be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 117641dd62155fd2eeddd93b2036154b13c05b70ba2Jeff Hamilton public static final int NFC_V = 5; 1186be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1196be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 120ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link Ndef}. 121ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 1224e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 1236be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 124641dd62155fd2eeddd93b2036154b13c05b70ba2Jeff Hamilton public static final int NDEF = 6; 1256be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1266be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 127ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link NdefFormatable}. 128ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is mandatory. 1294e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 13039f91ed5290e8b27c795f8aec181a6dd4431d317Martijn Coenen */ 131641dd62155fd2eeddd93b2036154b13c05b70ba2Jeff Hamilton public static final int NDEF_FORMATABLE = 7; 13239f91ed5290e8b27c795f8aec181a6dd4431d317Martijn Coenen 13339f91ed5290e8b27c795f8aec181a6dd4431d317Martijn Coenen /** 134ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link MifareClassic}. 135ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is optional. If a stack doesn't support this technology 136ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * type tags using it must still be discovered and present the lower level radio interface 137ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * technologies in use. 1384e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 1396be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 140641dd62155fd2eeddd93b2036154b13c05b70ba2Jeff Hamilton public static final int MIFARE_CLASSIC = 8; 1416be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1426be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 143ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * This technology is an instance of {@link MifareUltralight}. 144ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * <p>Support for this technology type is optional. If a stack doesn't support this technology 145ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * type tags using it must still be discovered and present the lower level radio interface 146ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * technologies in use. 1474e21e1d21a877cce4db5ec8c5786604cc10f2d7eJeff Hamilton * @hide 1486be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 149641dd62155fd2eeddd93b2036154b13c05b70ba2Jeff Hamilton public static final int MIFARE_ULTRALIGHT = 9; 1506be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1516be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 1520bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen * This technology is an instance of {@link NfcBarcode}. 1530bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen * <p>Support for this technology type is optional. If a stack doesn't support this technology 1540bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen * type tags using it must still be discovered and present the lower level radio interface 1550bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen * technologies in use. 1560bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen * @hide 1570bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen */ 1580bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen public static final int NFC_BARCODE = 10; 1590bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen 1600bec15ebed8b8639076cba184af3235e17f48718Martijn Coenen /** 16174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * Get the {@link Tag} object backing this {@link TagTechnology} object. 16274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * @return the {@link Tag} backing this {@link TagTechnology} object. 1636be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 1646be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton public Tag getTag(); 1656be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1666be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 16774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * Enable I/O operations to the tag from this {@link TagTechnology} object. 16874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>May cause RF activity and may block. Must not be called 16974fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * from the main application thread. A blocked call will be canceled with 17074fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link IOException} by calling {@link #close} from another thread. 17174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>Only one {@link TagTechnology} object can be connected to a {@link Tag} at a time. 17274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>Applications must call {@link #close} when I/O operations are complete. 173ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * 17439cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. 17539cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * 176ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * @see #close() 17774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * @throws TagLostException if the tag leaves the field 17874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * @throws IOException if there is an I/O failure, or connect is canceled 1796be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 1806be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton public void connect() throws IOException; 1816be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton 1826be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton /** 183ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * Re-connect to the {@link Tag} associated with this connection. Reconnecting to a tag can be 184ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * used to reset the state of the tag itself. 185ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * 18674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>May cause RF activity and may block. Must not be called 18774fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * from the main application thread. A blocked call will be canceled with 18874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * {@link IOException} by calling {@link #close} from another thread. 189ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * 19039cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. 19139cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * 192ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * @see #connect() 193ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * @see #close() 19474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * @throws TagLostException if the tag leaves the field 19574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * @throws IOException if there is an I/O failure, or connect is canceled 196f003e26df96067b4b136f0859012cb7ec3ed930fNick Pelly * @hide 1970d27f999f4b1ad51da11946800b40d2978fc6326Martijn Coenen */ 1980d27f999f4b1ad51da11946800b40d2978fc6326Martijn Coenen public void reconnect() throws IOException; 1990d27f999f4b1ad51da11946800b40d2978fc6326Martijn Coenen 2000d27f999f4b1ad51da11946800b40d2978fc6326Martijn Coenen /** 20174fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * Disable I/O operations to the tag from this {@link TagTechnology} object, and release resources. 20274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>Also causes all blocked I/O operations on other thread to be canceled and 20374fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * return with {@link IOException}. 204ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * 20539cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. 20639cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * 207ce3224cda51f946871daa1e11e3976e25c59e6faJeff Hamilton * @see #connect() 2086be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton */ 2093fcedf77286a078ebd7ac8c082365bd80703dfdcNick Pelly public void close() throws IOException; 210f003e26df96067b4b136f0859012cb7ec3ed930fNick Pelly 211f003e26df96067b4b136f0859012cb7ec3ed930fNick Pelly /** 21274fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * Helper to indicate if I/O operations should be possible. 21374fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * 21474fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>Returns true if {@link #connect} has completed, and {@link #close} has not been 21574fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * called, and the {@link Tag} is not known to be out of range. 21674fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * <p>Does not cause RF activity, and does not block. 21739cf3a445e507f219ecc8a476f6038f095d9d520Nick Pelly * 21874fe6c6b245ebe7d3b3d96962c32980d88dca4f5Nick Pelly * @return true if I/O operations should be possible 219f003e26df96067b4b136f0859012cb7ec3ed930fNick Pelly */ 220f003e26df96067b4b136f0859012cb7ec3ed930fNick Pelly public boolean isConnected(); 2216be655c768a82716612c00fdd156254d8dc00f42Jeff Hamilton} 222