diff options
author | Nick Pelly <npelly@google.com> | 2010-10-28 13:39:37 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-10-28 14:54:52 -0700 |
commit | 11b075e218b9921a953eeebe73fcd1a8a81f764b (patch) | |
tree | 7efd302691767e6f3e7ba83fcd2f9ee2ada647ae | |
parent | 120a4594855951ed5eb185fdfc19bf98efef3ba2 (diff) | |
download | frameworks_base-11b075e218b9921a953eeebe73fcd1a8a81f764b.zip frameworks_base-11b075e218b9921a953eeebe73fcd1a8a81f764b.tar.gz frameworks_base-11b075e218b9921a953eeebe73fcd1a8a81f764b.tar.bz2 |
Hide some NFC API's.
We are leaving enough API so that you can see when any Tag is discovered,
get its ID, and get its NDEF messages.
But for advanced use - creating tag connections and writing messages - we have
2 problems. Firstly a lot of the code is untested
(RawTagConnection.transceive()), or in some cases known not to work
(NdefTagConnection.write()). Secondly, there is still debate about how to
best expose information about Tags.
The set of data/methods exposed for a Tag changes completely depending on the
tag technology. There may be multiple sets of technology implemented in a
single tag. Tag A may have technology X and Y, Tag B may have technology Y
and Z. Furthermore, some NFC controllers will be not be able to use all
technologies, and so Android Device 1 may see technology X and Y on Tag A but
Android device 2 may only see technology X. So we have a pretty challenging
set of constraints to work under, and we are not convinced the current Tag and
NdefTag class is the best approach going forwards.
The Tag application should be able to remain unbundled, since it just needs to
get incoming NDEF Messages.
Change-Id: Ic09f094f33794e10f8d730fffe011c9a5957e0ac
Signed-off-by: Nick Pelly <npelly@google.com>
-rw-r--r-- | api/current.xml | 616 | ||||
-rw-r--r-- | core/java/android/nfc/FormatException.java | 1 | ||||
-rw-r--r-- | core/java/android/nfc/NdefMessage.java | 8 | ||||
-rw-r--r-- | core/java/android/nfc/NdefRecord.java | 2 | ||||
-rw-r--r-- | core/java/android/nfc/NdefTag.java | 1 | ||||
-rw-r--r-- | core/java/android/nfc/NdefTagConnection.java | 1 | ||||
-rw-r--r-- | core/java/android/nfc/NfcAdapter.java | 36 | ||||
-rw-r--r-- | core/java/android/nfc/RawTagConnection.java | 1 | ||||
-rw-r--r-- | core/java/android/nfc/Tag.java | 3 | ||||
-rw-r--r-- | core/java/android/nfc/package.html | 20 | ||||
-rw-r--r-- | core/res/AndroidManifest.xml | 1 |
11 files changed, 38 insertions, 652 deletions
diff --git a/api/current.xml b/api/current.xml index d3d3e3d..3056e47 100644 --- a/api/current.xml +++ b/api/current.xml @@ -99791,7 +99791,7 @@ extends="java.lang.Object" abstract="false" static="false" - final="false" + final="true" deprecated="not deprecated" visibility="public" > @@ -99882,7 +99882,7 @@ extends="java.lang.Object" abstract="false" static="false" - final="false" + final="true" deprecated="not deprecated" visibility="public" > @@ -100162,273 +100162,6 @@ > </field> </class> -<class name="NdefTag" - extends="android.nfc.Tag" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.Parcelable"> -</implements> -<method name="createMockNdefTag" - return="android.nfc.NdefTag" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="id" type="byte[]"> -</parameter> -<parameter name="rawTargets" type="java.lang.String[]"> -</parameter> -<parameter name="pollBytes" type="byte[]"> -</parameter> -<parameter name="activationBytes" type="byte[]"> -</parameter> -<parameter name="ndefTargets" type="java.lang.String[]"> -</parameter> -<parameter name="messages" type="android.nfc.NdefMessage[][]"> -</parameter> -</method> -<method name="getNdefMessages" - return="android.nfc.NdefMessage[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getNdefMessages" - return="android.nfc.NdefMessage[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="java.lang.String"> -</parameter> -</method> -<method name="getNdefTargets" - return="java.lang.String[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<field name="CREATOR" - type="android.os.Parcelable.Creator" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_MIFARE_CLASSIC" - type="java.lang.String" - transient="false" - volatile="false" - value=""type_mifare_classic"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_OTHER" - type="java.lang.String" - transient="false" - volatile="false" - value=""other"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_TYPE_1" - type="java.lang.String" - transient="false" - volatile="false" - value=""type_1"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_TYPE_2" - type="java.lang.String" - transient="false" - volatile="false" - value=""type_2"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_TYPE_3" - type="java.lang.String" - transient="false" - volatile="false" - value=""type_3"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_TYPE_4" - type="java.lang.String" - transient="false" - volatile="false" - value=""type_4"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="NdefTagConnection" - extends="android.nfc.RawTagConnection" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="getModeHint" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="IOException" type="java.io.IOException"> -</exception> -</method> -<method name="makeReadOnly" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="IOException" type="java.io.IOException"> -</exception> -</method> -<method name="readNdefMessages" - return="android.nfc.NdefMessage[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="FormatException" type="android.nfc.FormatException"> -</exception> -<exception name="IOException" type="java.io.IOException"> -</exception> -</method> -<method name="writeNdefMessage" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="android.nfc.NdefMessage"> -</parameter> -<exception name="FormatException" type="android.nfc.FormatException"> -</exception> -<exception name="IOException" type="java.io.IOException"> -</exception> -</method> -<field name="NDEF_MODE_READ_ONCE" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="NDEF_MODE_READ_ONLY" - type="int" - transient="false" - volatile="false" - value="2" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="NDEF_MODE_UNKNOWN" - type="int" - transient="false" - volatile="false" - value="5" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="NDEF_MODE_WRITE_MANY" - type="int" - transient="false" - volatile="false" - value="4" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="NDEF_MODE_WRITE_ONCE" - type="int" - transient="false" - volatile="false" - value="3" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> <class name="NfcAdapter" extends="java.lang.Object" abstract="false" @@ -100437,62 +100170,6 @@ deprecated="not deprecated" visibility="public" > -<method name="createNdefTagConnection" - return="android.nfc.NdefTagConnection" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="tag" type="android.nfc.NdefTag"> -</parameter> -</method> -<method name="createNdefTagConnection" - return="android.nfc.NdefTagConnection" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="tag" type="android.nfc.NdefTag"> -</parameter> -<parameter name="target" type="java.lang.String"> -</parameter> -</method> -<method name="createRawTagConnection" - return="android.nfc.RawTagConnection" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="tag" type="android.nfc.Tag"> -</parameter> -</method> -<method name="createRawTagConnection" - return="android.nfc.RawTagConnection" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="tag" type="android.nfc.Tag"> -</parameter> -<parameter name="target" type="java.lang.String"> -</parameter> -</method> <method name="getDefaultAdapter" return="android.nfc.NfcAdapter" abstract="false" @@ -100504,17 +100181,6 @@ visibility="public" > </method> -<method name="getLocalNdefMessage" - return="android.nfc.NdefMessage" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="isEnabled" return="boolean" abstract="false" @@ -100526,30 +100192,6 @@ visibility="public" > </method> -<method name="setLocalNdefMessage" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="android.nfc.NdefMessage"> -</parameter> -</method> -<field name="ACTION_NDEF_TAG_DISCOVERED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.nfc.action.NDEF_TAG_DISCOVERED"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="ACTION_TAG_DISCOVERED" type="java.lang.String" transient="false" @@ -100561,268 +100203,22 @@ visibility="public" > </field> -<field name="EXTRA_TAG" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.nfc.extra.TAG"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="RawTagConnection" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="close" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="connect" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="IOException" type="java.io.IOException"> -</exception> -</method> -<method name="getTag" - return="android.nfc.Tag" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getTagTarget" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="isConnected" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="transceive" - return="byte[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="data" type="byte[]"> -</parameter> -<exception name="IOException" type="java.io.IOException"> -</exception> -</method> -</class> -<class name="Tag" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.Parcelable"> -</implements> -<method name="createMockTag" - return="android.nfc.Tag" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="id" type="byte[]"> -</parameter> -<parameter name="rawTargets" type="java.lang.String[]"> -</parameter> -<parameter name="pollBytes" type="byte[]"> -</parameter> -<parameter name="activationBytes" type="byte[]"> -</parameter> -</method> -<method name="describeContents" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getActivationBytes" - return="byte[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getId" - return="byte[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getPollBytes" - return="byte[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getRawTargets" - return="java.lang.String[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="writeToParcel" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="dest" type="android.os.Parcel"> -</parameter> -<parameter name="flags" type="int"> -</parameter> -</method> -<field name="CREATOR" - type="android.os.Parcelable.Creator" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_ISO_14443_3A" - type="java.lang.String" - transient="false" - volatile="false" - value=""iso14443_3a"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_ISO_14443_3B" - type="java.lang.String" - transient="false" - volatile="false" - value=""iso14443_3b"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_ISO_14443_4" - type="java.lang.String" - transient="false" - volatile="false" - value=""iso14443_4"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_ISO_15693" - type="java.lang.String" - transient="false" - volatile="false" - value=""iso15693"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="TARGET_JIS_X_6319_4" +<field name="EXTRA_ID" type="java.lang.String" transient="false" volatile="false" - value=""jis_x_6319_4"" + value=""android.nfc.extra.ID"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="TARGET_OTHER" +<field name="EXTRA_NDEF_MESSAGES" type="java.lang.String" transient="false" volatile="false" - value=""other"" + value=""android.nfc.extra.NDEF_MESSAGES"" static="true" final="true" deprecated="not deprecated" diff --git a/core/java/android/nfc/FormatException.java b/core/java/android/nfc/FormatException.java index 21a7c3b..7045a03 100644 --- a/core/java/android/nfc/FormatException.java +++ b/core/java/android/nfc/FormatException.java @@ -16,7 +16,6 @@ package android.nfc; -//TODO(npelly) javadoc or consider alternatives public class FormatException extends Exception { public FormatException() { super(); diff --git a/core/java/android/nfc/NdefMessage.java b/core/java/android/nfc/NdefMessage.java index feca94e..d107b54 100644 --- a/core/java/android/nfc/NdefMessage.java +++ b/core/java/android/nfc/NdefMessage.java @@ -28,7 +28,7 @@ import android.os.Parcelable; * message always contains zero or more NDEF records.</p> * <p>This is an immutable data class. */ -public class NdefMessage implements Parcelable { +public final class NdefMessage implements Parcelable { private static final byte FLAG_MB = (byte) 0x80; private static final byte FLAG_ME = (byte) 0x40; @@ -69,9 +69,9 @@ public class NdefMessage implements Parcelable { * Returns a byte array representation of this entire NDEF message. */ public byte[] toByteArray() { - //TODO(nxp): do not return null - //TODO(nxp): allocate the byte array once, copy each record once - //TODO(nxp): process MB and ME flags outside loop + //TODO: do not return null + //TODO: allocate the byte array once, copy each record once + //TODO: process MB and ME flags outside loop if ((mRecords == null) || (mRecords.length == 0)) return null; diff --git a/core/java/android/nfc/NdefRecord.java b/core/java/android/nfc/NdefRecord.java index 557e44d..746d3df 100644 --- a/core/java/android/nfc/NdefRecord.java +++ b/core/java/android/nfc/NdefRecord.java @@ -35,7 +35,7 @@ import java.lang.UnsupportedOperationException; * large. * <p>This is an immutable data class. */ -public class NdefRecord implements Parcelable { +public final class NdefRecord implements Parcelable { /** * Indicates no type, id, or payload is associated with this NDEF Record. * <p> diff --git a/core/java/android/nfc/NdefTag.java b/core/java/android/nfc/NdefTag.java index 0626edb..eb9d0dc 100644 --- a/core/java/android/nfc/NdefTag.java +++ b/core/java/android/nfc/NdefTag.java @@ -35,6 +35,7 @@ import android.os.Parcelable; * time and calls on this class will retrieve those read-only properties, and * not cause any further RF activity or block. Note however that arrays passed to and * returned by this class are *not* cloned, so be careful not to modify them. + * @hide */ public class NdefTag extends Tag implements Parcelable { /** diff --git a/core/java/android/nfc/NdefTagConnection.java b/core/java/android/nfc/NdefTagConnection.java index 27fa25c..aafdbfd 100644 --- a/core/java/android/nfc/NdefTagConnection.java +++ b/core/java/android/nfc/NdefTagConnection.java @@ -28,6 +28,7 @@ import android.util.Log; * <p class="note"><strong>Note:</strong> * Use of this class requires the {@link android.Manifest.permission#NFC} * permission. + * @hide */ public class NdefTagConnection extends RawTagConnection { public static final int NDEF_MODE_READ_ONCE = 1; diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java index a093d12..cf80faf 100644 --- a/core/java/android/nfc/NfcAdapter.java +++ b/core/java/android/nfc/NfcAdapter.java @@ -31,37 +31,29 @@ import android.util.Log; * Use the static {@link #getDefaultAdapter} method to get the default NFC * Adapter for this Android device. Most Android devices will have only one NFC * Adapter, and {@link #getDefaultAdapter} returns the singleton object. - * <p> - * {@link NfcAdapter} can be used to create {@link RawTagConnection} or - * {@link NdefTagConnection} connections to modify or perform low level access - * to NFC Tags. - * <p class="note"> - * <strong>Note:</strong> Some methods require the - * {@link android.Manifest.permission#NFC} permission. */ public final class NfcAdapter { /** - * Intent to start an activity when a non-NDEF tag is discovered. - * TODO(npelly) finalize decision on using CATEGORY or DATA URI to provide a - * hint for applications to filter the tag type. - * TODO(npelly) probably combine these two intents since tags aren't that simple + * Intent to start an activity when a tag is discovered. */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED"; /** - * Intent to start an activity when a NDEF tag is discovered. TODO(npelly) - * finalize decision on using CATEGORY or DATA URI to provide a hint for - * applications to filter the tag type. + * Mandatory Tag extra for the ACTION_TAG intents. + * @hide */ - @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) - public static final String ACTION_NDEF_TAG_DISCOVERED = - "android.nfc.action.NDEF_TAG_DISCOVERED"; + public static final String EXTRA_TAG = "android.nfc.extra.TAG"; /** - * Mandatory Tag extra for the ACTION_TAG and ACTION_NDEF_TAG intents. + * Optional NdefMessage[] extra for the ACTION_TAG intents. */ - public static final String EXTRA_TAG = "android.nfc.extra.TAG"; + public static final String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES"; + + /** + * Optional byte[] extra for the tag identifier. + */ + public static final String EXTRA_ID = "android.nfc.extra.ID"; /** * Broadcast Action: a transaction with a secure element has been detected. @@ -324,6 +316,7 @@ public final class NfcAdapter { * <p>Requires {@link android.Manifest.permission#NFC} permission. * * @param message NDEF message to make public + * @hide */ public void setLocalNdefMessage(NdefMessage message) { try { @@ -338,6 +331,7 @@ public final class NfcAdapter { * <p>Requires {@link android.Manifest.permission#NFC} permission. * * @return NDEF Message that is publicly readable + * @hide */ public NdefMessage getLocalNdefMessage() { try { @@ -351,6 +345,7 @@ public final class NfcAdapter { /** * Create a raw tag connection to the default Target * <p>Requires {@link android.Manifest.permission#NFC} permission. + * @hide */ public RawTagConnection createRawTagConnection(Tag tag) { if (tag.mServiceHandle == 0) { @@ -367,6 +362,7 @@ public final class NfcAdapter { /** * Create a raw tag connection to the specified Target * <p>Requires {@link android.Manifest.permission#NFC} permission. + * @hide */ public RawTagConnection createRawTagConnection(Tag tag, String target) { if (tag.mServiceHandle == 0) { @@ -383,6 +379,7 @@ public final class NfcAdapter { /** * Create an NDEF tag connection to the default Target * <p>Requires {@link android.Manifest.permission#NFC} permission. + * @hide */ public NdefTagConnection createNdefTagConnection(NdefTag tag) { if (tag.mServiceHandle == 0) { @@ -399,6 +396,7 @@ public final class NfcAdapter { /** * Create an NDEF tag connection to the specified Target * <p>Requires {@link android.Manifest.permission#NFC} permission. + * @hide */ public NdefTagConnection createNdefTagConnection(NdefTag tag, String target) { if (tag.mServiceHandle == 0) { diff --git a/core/java/android/nfc/RawTagConnection.java b/core/java/android/nfc/RawTagConnection.java index 24072e5..bfdaa77 100644 --- a/core/java/android/nfc/RawTagConnection.java +++ b/core/java/android/nfc/RawTagConnection.java @@ -32,6 +32,7 @@ import android.util.Log; * <p class="note"><strong>Note:</strong> * Use of this class requires the {@link android.Manifest.permission#NFC} * permission. + * @hide */ public class RawTagConnection { diff --git a/core/java/android/nfc/Tag.java b/core/java/android/nfc/Tag.java index dc6e798..5d0b04c 100644 --- a/core/java/android/nfc/Tag.java +++ b/core/java/android/nfc/Tag.java @@ -41,6 +41,7 @@ import android.os.Parcelable; * time and calls on this class will retrieve those read-only properties, and * not cause any further RF activity or block. Note however that arrays passed to and * returned by this class are *not* cloned, so be careful not to modify them. + * @hide */ public class Tag implements Parcelable { /** @@ -156,6 +157,7 @@ public class Tag implements Parcelable { * from SENSF_RES * * @return poll bytes, or null if they do not exist for this Tag technology + * @hide */ public byte[] getPollBytes() { return mPollBytes; @@ -172,6 +174,7 @@ public class Tag implements Parcelable { * <p>JIS_X_6319_4: null * <p>ISO15693: response flags (1 byte), DSFID (1 byte): null * @return activation bytes, or null if they do not exist for this Tag technology + * @hide */ public byte[] getActivationBytes() { return mActivationBytes; diff --git a/core/java/android/nfc/package.html b/core/java/android/nfc/package.html index 8754cb9..b054d1c 100644 --- a/core/java/android/nfc/package.html +++ b/core/java/android/nfc/package.html @@ -1,30 +1,18 @@ <HTML> <BODY> -Provides access to Near Field Communication (NFC) functionality, allowing applications to connect -to NFC tags, then transmit and recieving data. A "tag" may actually be another device that appears -as a tag. +Provides access to Near Field Communication (NFC) functionality, allowing applications to read +NDEF message in NFC tags. A "tag" may actually be another device that appears as a tag. <p>Here's a summary of the classes:</p> <dl> <dt>{@link android.nfc.NfcAdapter}</dt> <dd>This represents the device's NFC adapter, which is your entry-point to performing NFC -operations. Once you acquire an instance with {@link android.nfc.NfcAdapter#getDefaultAdapter}, you -can create connections to tags.</dd> - <dt>{@link android.nfc.NdefTag} and {@link android.nfc.Tag}</dt> - <dd>These objects represent a tag. A tag is a thing that the NFC-enabled device can -communicate with when within range. Usually, you'll work with {@link android.nfc.NdefTag}, which -represents a tag that's compliant with the NFC Data Exchange Format (NDEF); a {@link -android.nfc.Tag} represents a generalized tag. Note that {@link android.nfc.NdefTag} extends -{@link android.nfc.Tag}.</dd> - <dt>{@link android.nfc.NdefTagConnection} and {@link android.nfc.RawTagConnection}</dt> - <dd>These objects represent a connection to a tag, respective to the type of tag connected -(either {@link android.nfc.NdefTag} or {@link android.nfc.Tag}). Note that {@link -android.nfc.NdefTagConnection} extends {@link android.nfc.RawTagConnection}.</dd> +operations. You can acquire an instance with {@link android.nfc.NfcAdapter#getDefaultAdapter}.</dd> <dt>{@link android.nfc.NdefMessage}</dt> <dd>Represents an NDEF data message, which is the standard format in which "records" carrying data are transmitted between devices and tags. Your application can receive these -messages from an {@link android.nfc.NdefTagConnection}.</dd> +messages from an {@link android.nfc.NfcAdapter#ACTION_TAG_DISCOVERED} intent.</dd> <dt>{@link android.nfc.NdefRecord}</dt> <dd>Represents a record, which is delivered in a {@link android.nfc.NdefMessage} and describes the type of data being shared and carries the data itself.</dd> diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index a22c827..07a48e7 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -86,7 +86,6 @@ <protected-broadcast android:name="android.hardware.action.USB_DISCONNECTED" /> <protected-broadcast android:name="android.hardware.action.USB_STATE" /> - <protected-broadcast android:name="android.nfc.action.NDEF_TAG_DISCOVERED" /> <protected-broadcast android:name="android.nfc.action.TAG_DISCOVERED" /> <protected-broadcast android:name="android.nfc.action.LLCP_LINK_STATE_CHANGED" /> <protected-broadcast android:name="android.nfc.action.TRANSACTION_DETECTED" /> |