Home | History | Annotate | Download | only in tech

Lines Matching defs:Ndef

33  * Provides access to NDEF content and operations on a {@link Tag}.
35 * <p>Acquire a {@link Ndef} object using {@link #get}.
37 * <p>NDEF is an NFC Forum data format. The data formats are implemented in
44 * formatted to contain NDEF data.
52 * {@link Ndef} on NFC Forum Tag Types 1-4, and implement all NDEF operations
55 * <p>Some vendors have there own well defined specifications for storing NDEF data
57 * should enumerate and implement {@link Ndef} under these vendor specifications
60 * <code>com.nxp.ndef.mifareclassic</code>.
63 * implement {@link Ndef} on MIFARE Classic tags formatted to NDEF.
67 * with NDEF payload. Vendor NDEF formats will not work on all Android devices.
72 public final class Ndef extends BasicTagTechnology {
110 public static final String UNKNOWN = "android.ndef.unknown";
113 public static final String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1";
115 public static final String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2";
117 public static final String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3";
119 public static final String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4";
120 /** NDEF on MIFARE Classic */
121 public static final String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic";
123 * NDEF on iCODE SLI
126 public static final String ICODE_SLI = "com.nxp.ndef.icodesli";
134 * Get an instance of {@link Ndef} for the given tag.
136 * <p>Returns null if {@link Ndef} was not enumerated in {@link Tag#getTechList}.
137 * This indicates the tag is not NDEF formatted, or that this tag
138 * is NDEF formatted but under a vendor specification that this Android
146 public static Ndef get(Tag tag) {
147 if (!tag.hasTech(TagTechnology.NDEF)) return null;
149 return new Ndef(tag);
159 public Ndef(Tag tag) throws RemoteException {
160 super(tag, TagTechnology.NDEF);
161 Bundle extras = tag.getTechExtras(TagTechnology.NDEF);
168 throw new NullPointerException("NDEF tech extras are null.");
176 * <p>If the NDEF Message is modified by an I/O operation then it
181 * tag is formatted to support NDEF but does not contain a message yet.
183 * @return NDEF Message read from the tag at discovery time, can be null
190 * Get the NDEF tag type.
194 * {@link #MIFARE_CLASSIC} or another NDEF tag type that has not yet been
199 * @return a string representing the NDEF tag type
221 * Get the maximum NDEF message size in bytes.
249 * <p>This always reads the current NDEF Message stored on the tag.
253 * tag is formatted to support NDEF but does not contain a message yet.
261 * @return the NDEF Message, can be null
264 * @throws FormatException if the NDEF Message on the tag is malformed
299 * @param msg the NDEF Message to write, must not be null
302 * @throws FormatException if the NDEF Message to write is malformed
328 throw new IOException("Tag is not ndef");
396 throw new IOException("Tag is not ndef");