summaryrefslogtreecommitdiff
path: root/core/java/android/nfc/NfcEvent.java
Commit message (Collapse)AuthorAgeFilesLines
* Make peer LLCP version an int.Martijn Coenen2015-06-101-4/+9
| | | | | | | And split major/minor. Bug: 21343778 Change-Id: Ie9f0ecc9172849d3b088a0c1ce6d872b2f607919
* Expose peer LLCP version in NDEF callbacks.Martijn Coenen2015-04-151-1/+8
| | | | Change-Id: I98b9a9764b66345f842c1f845c8a386161d965f5
* docs: mix of BT and NFC javadoc updatesScott Main2011-09-271-2/+2
| | | | | | | Add Health profile to various discussions about profiles Add descriptions to NFC interfaces, tweak some desciptions, and fix some broken links Change-Id: Ib89434c78a4ad60b4358dca9a6c335451d1c4125
* Improve NDEF push APINick Pelly2011-08-261-0/+44
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