History log of /frameworks/base/core/java/android/nfc/NfcManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2b072677538de979961b5bf527109fdab1713731 23-Dec-2011 Joe Fernandez <joefernandez@google.com> am 201469f5: am bb7f590a: Merge "docs: Add developer guide cross-references, Project ACRE, round 4" into ics-mr1

* commit '201469f54522436be79d4d6665721049bfc74320':
docs: Add developer guide cross-references, Project ACRE, round 4
3aef8e1d1b2f0b87d470bcccf37ba4ebb6560c45 20-Dec-2011 Joe Fernandez <joefernandez@google.com> docs: Add developer guide cross-references, Project ACRE, round 4

Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
/frameworks/base/core/java/android/nfc/NfcManager.java
b04cce0eb5917db436b7db39eb67c064df2e015a 22-Nov-2011 Nick Pelly <npelly@google.com> Throw a nicer error message when using an invalid context to create Nfc

This can happen when using getContext() instead of getTargetContext()
in an InstrumentationTestCase.

Bug: 5644274
Change-Id: I020a637c271e25bcf25ae2927fd878001d5fea0a
/frameworks/base/core/java/android/nfc/NfcManager.java
bb951c893973691554f49d2e725985125f866b27 08-Nov-2011 Jeff Hamilton <jham@android.com> Changes for access control.

The package name is now required when using the
NFC extras APIs so the context is stored away
and used to derive the package name to be sent
to the NfcService.

Bug: 4515759
Change-Id: I1a3aba3fc026e0090a914b0686fc4b8dec25b927
/frameworks/base/core/java/android/nfc/NfcManager.java
c84c89a6cacaf16c1ba41f57cc1aecdb150e85f9 23-Aug-2011 Nick Pelly <npelly@google.com> Improve NDEF push API

Introduce
setNdefPushMessage()
setNdefPushMessageCallback()
setNdefPushCompleteCallback()

Deprecate public API
enableForegroundNdefPush()
disableForegroundNdefPush()

Hide & Deprecate staged (public but never released) API
enableForegroundNdefPushCallback()

The new API's do not require the application to explicitly call
enable()/disable() in onPause()/onResume(), we use a Fragment behind
the scenes to manager this automatically.

NDEF Push can be disabled by using a null parameter, so each
enable()/disable() pair is collapsed to a single set() call.

Application code should now look something like:

public void onCreate() {
NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
if (adapter != null) { // check that NFC is available on this device
adapter.setNdefPushMessage(myNdefMessage, this);
}
}

And that's it - no need to explicitly hook into onPause() and onResume() events.

Also - introduce a generic NfcEvent class that is provided as a parameter on
all NFC callbacks. Right now it just provides the NfcAdapter, but using
the wrapper classes allows us to add more fields later without changing
the callback signature. (i'm thinking Bluetooth).

Change-Id: I371dcb026b535b8199225c1262eca64ce644458a
/frameworks/base/core/java/android/nfc/NfcManager.java
50b4d8f643f31b37e9872f562fb869059cf79c8a 08-Dec-2010 Nick Pelly <npelly@google.com> Make getSystemService(NFC_SERVICE) the NFC entry point.

This gives NFC service a handle to the application context.

Deprecate NfcAdapter.getDefaultAdapter(), it does not provide a context.
Using this method will print a warning, and will later throw an exception
if a method that requires a context is called. No 2.3 API's will fail, but
new API's that do require a context might fail.

Also add helper NfcAdapter.getDefaultAdapter(Context).

Change-Id: I9a6378de4ef4b61ad922f8d53e64e2a1a1d5d60c
/frameworks/base/core/java/android/nfc/NfcManager.java