{"id":15616393,"url":"https://github.com/chariotsolutions/phonegap-nfc","last_synced_at":"2025-05-15T00:13:37.258Z","repository":{"id":37952966,"uuid":"1907041","full_name":"chariotsolutions/phonegap-nfc","owner":"chariotsolutions","description":"PhoneGap NFC Plugin","archived":false,"fork":false,"pushed_at":"2024-08-20T16:22:12.000Z","size":1427,"stargazers_count":729,"open_issues_count":92,"forks_count":594,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-05-12T05:42:38.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chariotsolutions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-06-16T17:58:16.000Z","updated_at":"2025-04-23T22:23:02.000Z","dependencies_parsed_at":"2024-01-25T20:02:20.253Z","dependency_job_id":"afff9d26-81d4-4fd0-b2fb-3c5f7538a261","html_url":"https://github.com/chariotsolutions/phonegap-nfc","commit_stats":{"total_commits":454,"total_committers":28,"mean_commits":"16.214285714285715","dds":"0.32378854625550657","last_synced_commit":"d325b860af64869e4b6d7996c37d61d2492310d5"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chariotsolutions%2Fphonegap-nfc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chariotsolutions%2Fphonegap-nfc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chariotsolutions%2Fphonegap-nfc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chariotsolutions%2Fphonegap-nfc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chariotsolutions","download_url":"https://codeload.github.com/chariotsolutions/phonegap-nfc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249206,"owners_count":22039029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T07:07:47.409Z","updated_at":"2025-05-15T00:13:32.249Z","avatar_url":"https://github.com/chariotsolutions.png","language":"Java","funding_links":[],"categories":["App"],"sub_categories":["Low Level"],"readme":"PhoneGap NFC Plugin\n==========================\n\nThe NFC plugin allows you to read and write  NFC tags. You can also beam to, and receive from, other NFC enabled devices.\n\nUse to\n* read data from NFC tags\n* write data to NFC tags\n* send data to other NFC enabled devices\n* receive data from NFC devices\n* send raw commands (ISO 14443-3A, ISO 14443-3A, ISO 14443-4, JIS 6319-4, ISO 15693) to NFC tags\n\nThis plugin uses NDEF (NFC Data Exchange Format) for maximum compatibilty between NFC devices, tag types, and operating systems.\n\nSupported Platforms\n-------------------\n* Android\n* [iOS 11](#ios-notes)\n* Windows (includes Windows Phone 8.1, Windows 8.1, Windows 10)\n* BlackBerry 10\n* Windows Phone 8\n* BlackBerry 7\n\n## Contents\n\n* [Installing](#installing)\n* [NFC](#nfc)\n* [NDEF](#ndef)\n  - [NdefMessage](#ndefmessage)\n  - [NdefRecord](#ndefrecord)\n* [Events](#events)\n* [Platform Differences](#platform-differences)\n* [BlackBerry 10 Invoke Target](#blackberry-10-invoke-target)\n* [Launching Application when Scanning a Tag](#launching-your-android-application-when-scanning-a-tag)\n* [Testing](#testing)\n* [Sample Projects](#sample-projects)\n* [Host Card Emulation (HCE)](#hce)\n* [Book](#book)\n* [License](#license)\n\n# Installing\n\n### Cordova\n\n    $ cordova plugin add phonegap-nfc\n\n### PhoneGap\n\n    $ phonegap plugin add phonegap-nfc\n\n### PhoneGap Build\n\nEdit config.xml to install the plugin for [PhoneGap Build](http://build.phonegap.com).\n\n    \u003cpreference name=\"phonegap-version\" value=\"cli-9.0.0\" /\u003e\n    \u003cplugin name=\"phonegap-nfc\" source=\"npm\" /\u003e\n\n\nWindows Phone 8.1 should use the **windows** platform. The Silverlight based Windows Phone 8 code is no longer being maintained.\n\nBlackBerry 7 support is only available for Cordova 2.x. For applications targeting BlackBerry 7, you may need to use an older version of phonegap-nfc.\n\nSee [Getting Started](https://github.com/chariotsolutions/phonegap-nfc/blob/master/doc/GettingStartedCLI.md) and [Getting Started BlackBerry 10](https://github.com/chariotsolutions/phonegap-nfc/blob/master/doc/GettingStartedBlackberry10.md)for more details.\n\n## iOS Notes\n\nReading NFC NDEF tags is supported on iPhone 7 (and newer) since iOS 11. iOS 13 added support for writing NDEF messages to NFC tags. iOS 13 also adds the ability to get the UID from some NFC tags. On iOS, the user must start a NFC session to scan for a tag. This is different from Android which can constantly scan for NFC tags. The [nfc.scanNdef](#nfcscanndef) and [nfc.scanTag](#nfcscantag) functions start a NFC scanning session. The NFC tag is returned to the caller via a Promise. If your existing code uses the deprecated [nfc.beginSession](#nfcbeginsession), update it to use `nfc.scanNdef`.\n\nThe `scanNdef` function uses [NFCNDEFReaderSession](https://developer.apple.com/documentation/corenfc/nfcndefreadersession) to detect NFC Data Exchange Format (NDEF) tags. `scanTag` uses the newer [NFCTagReaderSession](https://developer.apple.com/documentation/corenfc/nfctagreadersession) available in iOS 13 to detect ISO15693, FeliCa, and MIFARE tags. The `scanTag` function will include the tag UID and tag type for *some* NFC tags along with the NDEF messages. `scanTag` can also read some RFID tags without NDEF messsages. `scanTag` will not scan some NDEF tags including Topaz and Mifare Classic. \n\nYou must call [nfc.scanNdef](#nfcscanndef) and [nfc.scanTag](#nfcscantag) before every scan. \n\nWriting NFC tags on iOS uses the same [nfc.write](#nfcwrite) function as other platforms. Although it's the same function, the behavior is different on iOS. Calling `nfc.write` on an iOS device will start a new scanning session and write data to the scanned tag.\n\n# NFC\n\n\u003e The nfc object provides access to the device's NFC sensor.\n\n## Methods\n\n- [nfc.addNdefListener](#nfcaddndeflistener)\n- [nfc.addTagDiscoveredListener](#nfcaddtagdiscoveredlistener)\n- [nfc.addMimeTypeListener](#nfcaddmimetypelistener)\n- [nfc.addNdefFormatableListener](#nfcaddndefformatablelistener)\n- [nfc.write](#nfcwrite)\n- [nfc.makeReadOnly](#nfcmakereadonly)\n- [nfc.share](#nfcshare)\n- [nfc.unshare](#nfcunshare)\n- [nfc.erase](#nfcerase)\n- [nfc.handover](#nfchandover)\n- [nfc.stopHandover](#nfcstophandover)\n- [nfc.enabled](#nfcenabled)\n- [nfc.showSettings](#nfcshowsettings)\n- [~~nfc.beginSession~~](#nfcbeginsession)\n- [~~nfc.invalidateSession~~](#nfcinvalidatesession)\n- [nfc.scanNdef](#nfcscanndef)\n- [nfc.scanTag](#nfcscanTag)\n- [nfc.cancelScan](#nfccancelscan)\n\n## ReaderMode\n\n- [nfc.readerMode](#nfcreadermode)\n- [nfc.disableReaderMode](#nfcdisablereadermode)\n\n## Tag Technology Functions\n\n- [nfc.connect](#nfcconnect)\n- [nfc.transceive](#nfctransceive)\n- [nfc.close](#nfcclose)\n- [ISO-DEP example](#tag-technology-functions-1)\n\n## nfc.addNdefListener\n\nRegisters an event listener for any NDEF tag.\n\n    nfc.addNdefListener(callback, [onSuccess], [onFailure]);\n\n### Parameters\n\n- __callback__: The callback that is called when an NDEF tag is read.\n- __onSuccess__: (Optional) The callback that is called when the listener is added.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.addNdefListener` registers the callback for ndef events.\n\nA ndef event is fired when a NDEF tag is read.\n\nFor BlackBerry 10, you must configure the type of tags your application will read with an [invoke-target in config.xml](#blackberry-10-invoke-target).\n\nOn Android registered [mimeTypeListeners](#nfcaddmimetypelistener) takes precedence over this more generic NDEF listener.\n\nOn iOS you must call [beingSession](#nfcbeginsession) before scanning a tag.\n\n### Supported Platforms\n\n- Android\n- iOS\n- Windows\n- BlackBerry 7\n- BlackBerry 10\n- Windows Phone 8\n\n## nfc.removeNdefListener\n\nRemoves the previously registered event listener for NDEF tags added via `nfc.addNdefListener`.\n\n    nfc.removeNdefListener(callback, [onSuccess], [onFailure]);\n\nRemoving listeners is not recommended. Instead, consider that your callback can ignore messages you no longer need.\n\n### Parameters\n\n- __callback__: The previously registered callback.\n- __onSuccess__: (Optional) The callback that is called when the listener is successfully removed.\n- __onFailure__: (Optional) The callback that is called if there was an error during removal.\n\n### Supported Platforms\n\n- Android\n- iOS\n- Windows\n- BlackBerry 7\n\n## nfc.addTagDiscoveredListener\n\nRegisters an event listener for tags matching any tag type.\n\n    nfc.addTagDiscoveredListener(callback, [onSuccess], [onFailure]);\n\n### Parameters\n\n- __callback__: The callback that is called when a tag is detected.\n- __onSuccess__: (Optional) The callback that is called when the listener is added.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.addTagDiscoveredListener` registers the callback for tag events.\n\nThis event occurs when any tag is detected by the phone.\n\n### Supported Platforms\n\n- Android\n- Windows\n- BlackBerry 7\n\nNote that Windows Phones need the newere NXP PN427 chipset to read non-NDEF tags. That tag will be read, but no tag meta-data is available.\n\n## nfc.removeTagDiscoveredListener\n\nRemoves the previously registered event listener added via `nfc.addTagDiscoveredListener`.\n\n    nfc.removeTagDiscoveredListener(callback, [onSuccess], [onFailure]);\n\nRemoving listeners is not recommended. Instead, consider that your callback can ignore messages you no longer need.\n\n### Parameters\n\n- __callback__: The previously registered callback.\n- __onSuccess__: (Optional) The callback that is called when the listener is successfully removed.\n- __onFailure__: (Optional) The callback that is called if there was an error during removal.\n\n### Supported Platforms\n\n- Android\n- Windows\n- BlackBerry 7\n\n## nfc.addMimeTypeListener\n\nRegisters an event listener for NDEF tags matching a specified MIME type.\n\n    nfc.addMimeTypeListener(mimeType, callback, [onSuccess], [onFailure]);\n\n### Parameters\n\n- __mimeType__: The MIME type to filter for messages.\n- __callback__: The callback that is called when an NDEF tag matching the MIME type is read.\n- __onSuccess__: (Optional) The callback that is called when the listener is added.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.addMimeTypeListener` registers the callback for ndef-mime events.\n\nA ndef-mime event occurs when a `Ndef.TNF_MIME_MEDIA` tag is read and matches the specified MIME type.\n\nThis function can be called multiple times to register different MIME types. You should use the *same* handler for all MIME messages.\n\n    nfc.addMimeTypeListener(\"text/json\", *onNfc*, success, failure);\n    nfc.addMimeTypeListener(\"text/demo\", *onNfc*, success, failure);\n\nOn Android, MIME types for filtering should always be lower case. (See [IntentFilter.addDataType()](http://developer.android.com/reference/android/content/IntentFilter.html#addDataType\\(java.lang.String\\)))\n\n### Supported Platforms\n\n- Android\n- BlackBerry 7\n\n## nfc.removeMimeTypeListener\n\nRemoves the previously registered event listener added via `nfc.addMimeTypeListener`.\n\n    nfc.removeMimeTypeListener(mimeType, callback, [onSuccess], [onFailure]);\n\nRemoving listeners is not recommended. Instead, consider that your callback can ignore messages you no longer need.\n\n### Parameters\n\n- __mimeType__: The MIME type to filter for messages.\n- __callback__: The previously registered callback.\n- __onSuccess__: (Optional) The callback that is called when the listener is successfully removed.\n- __onFailure__: (Optional) The callback that is called if there was an error during removal.\n\n### Supported Platforms\n\n- Android\n- BlackBerry 7\n\n## nfc.addNdefFormatableListener\n\nRegisters an event listener for formatable NDEF tags.\n\n    nfc.addNdefFormatableListener(callback, [onSuccess], [onFailure]);\n\n### Parameters\n\n- __callback__: The callback that is called when NDEF formatable tag is read.\n- __onSuccess__: (Optional) The callback that is called when the listener is added.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.addNdefFormatableListener` registers the callback for ndef-formatable events.\n\nA ndef-formatable event occurs when a tag is read that can be NDEF formatted.  This is not fired for tags that are already formatted as NDEF.  The ndef-formatable event will not contain an NdefMessage.\n\n### Supported Platforms\n\n- Android\n\n## nfc.write\n\nWrites an NDEF Message to a NFC tag.\n\nA NDEF Message is an array of one or more NDEF Records\n\n    var message = [\n        ndef.textRecord(\"hello, world\"),\n        ndef.uriRecord(\"http://github.com/chariotsolutions/phonegap-nfc\")\n    ];\n\n    nfc.write(message, [onSuccess], [onFailure]);\n\n### Parameters\n\n- __ndefMessage__: An array of NDEF Records.\n- __onSuccess__: (Optional) The callback that is called when the tag is written.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.write` writes an NdefMessage to a NFC tag.\n\nOn **Android** this method *must* be called from within an NDEF Event Handler.\n\nOn **iOS** this method can be called outside the NDEF Event Handler, it will start a new scanning session. Optionally you can reuse the read session to write data. See example below.\n\nOn **Windows** this method *may* be called from within the NDEF Event Handler.\n\nOn **Windows Phone 8.1** this method should be called outside the NDEF Event Handler, otherwise Windows tries to read the tag contents as you are writing to the tag.\n\n### Examples\n\n#### Android\n\nOn Android, write must be called inside an event handler\n\n    function onNfc(nfcEvent) {\n    \n        console.log(nfcEvent.tag);\n        \n        var message = [\n            ndef.textRecord(new String(new Date()))\n        ];\n        \n        nfc.write(\n            message,\n            success =\u003e console.log('wrote data to tag'),\n            error =\u003e console.log(error)\n        );\n\n    nfc.addNdefListener(onNfc);\n\n\n#### iOS - Simple\n\nCalling `nfc.write` on iOS will create a new session and write data when the user taps a NFC tag\n\n        var message = [\n            ndef.textRecord(\"Hello, world\")\n        ];\n\n        nfc.write(\n            message,\n            success =\u003e console.log('wrote data to tag'),\n            error =\u003e console.log(error)\n        );\n\n#### iOS - Read and Write\n\nOn iOS you can optionally write to NFC tag using the read session\n\n        try {\n            let tag = await nfc.scanNdef({ keepSessionOpen: true});\n\n            // you can read tag data here\n            console.log(tag);\n            \n            // this example writes a new message with a timestamp\n            var message = [\n                ndef.textRecord(new String(new Date()))\n            ];\n\n            nfc.write(\n                message,\n                success =\u003e console.log('wrote data to tag'),\n                error =\u003e console.log(error)\n            );\n\n        } catch (err) {\n            console.log(err);\n        }\n\n### Supported Platforms\n\n- Android\n- iOS\n- Windows\n- BlackBerry 7\n- Windows Phone 8\n\n## nfc.makeReadOnly\n\nMakes a NFC tag read only.  **Warning this is permanent.**\n\n    nfc.makeReadOnly([onSuccess], [onFailure]);\n\n### Parameters\n\n- __onSuccess__: (Optional) The callback that is called when the tag is locked.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.makeReadOnly` make a NFC tag read only. **Warning this is permanent** and can not be undone.\n\nOn **Android** this method *must* be called from within an NDEF Event Handler.\n\nExample usage\n\n    onNfc: function(nfcEvent) {\n\n        var record = [\n            ndef.textRecord(\"hello, world\")\n        ];\n\n        var failure = function(reason) {\n            alert(\"ERROR: \" + reason);\n        };\n\n        var lockSuccess = function() {\n            alert(\"Tag is now read only.\");\n        };\n\n        var lock = function() {\n            nfc.makeReadOnly(lockSuccess, failure);\n        };\n\n        nfc.write(record, lock, failure);\n\n    },\n\n### Supported Platforms\n\n- Android\n\n## nfc.share\n\nShares an NDEF Message via peer-to-peer.\n\nA NDEF Message is an array of one or more NDEF Records\n\n    var message = [\n        ndef.textRecord(\"hello, world\")\n    ];\n\n    nfc.share(message, [onSuccess], [onFailure]);\n\n### Parameters\n\n- __ndefMessage__: An array of NDEF Records.\n- __onSuccess__: (Optional) The callback that is called when the message is pushed.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.share` writes an NdefMessage via peer-to-peer.  This should appear as an NFC tag to another device.\n\n### Supported Platforms\n\n- Android\n- Windows\n- BlackBerry 7\n- BlackBerry 10\n- Windows Phone 8\n\n### Platform differences\n\n    Android - shares message until unshare is called\n    Blackberry 10 - shares the message one time or until unshare is called\n    Windows Phone 8 - must be called from within a NFC event handler like nfc.write\n\n## nfc.unshare\n\nStop sharing NDEF data via peer-to-peer.\n\n    nfc.unshare([onSuccess], [onFailure]);\n\n### Parameters\n\n- __onSuccess__: (Optional) The callback that is called when sharing stops.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.unshare` stops sharing data via peer-to-peer.\n\n### Supported Platforms\n\n- Android\n- Windows\n- BlackBerry 7\n- BlackBerry 10\n\n## nfc.erase\n\nErase a NDEF tag\n\n    nfc.erase([onSuccess], [onFailure]);\n\n### Parameters\n\n- __onSuccess__: (Optional) The callback that is called when sharing stops.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.erase` erases a tag by writing an empty message.  Will format unformatted tags before writing.\n\nThis method *must* be called from within an NDEF Event Handler.\n\n### Supported Platforms\n\n- Android\n- BlackBerry 7\n\n## nfc.handover\n\nSend a file to another device via NFC handover.\n\n    var uri = \"content://media/external/audio/media/175\";\n    nfc.handover(uri, [onSuccess], [onFailure]);\n\n\n    var uris = [\n        \"content://media/external/audio/media/175\",\n        \"content://media/external/audio/media/176\",\n        \"content://media/external/audio/media/348\"\n    ];\n    nfc.handover(uris, [onSuccess], [onFailure]);\n\n\n### Parameters\n\n- __uri__: A URI as a String, or an *array* of URIs.\n- __onSuccess__: (Optional) The callback that is called when the message is pushed.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.handover` shares files to a NFC peer using handover. Files are sent by specifying a file:// or context:// URI or a list of URIs. The file transfer is initiated with NFC but the transfer is completed with over Bluetooth or WiFi which is handled by a NFC handover request. The Android code is responsible for building the handover NFC Message.\n\nThis is Android only, but it should be possible to add implementations for other platforms.\n\n### Supported Platforms\n\n- Android\n\n## nfc.stopHandover\n\nStop sharing NDEF data via NFC handover.\n\n    nfc.stopHandover([onSuccess], [onFailure]);\n\n### Parameters\n\n- __onSuccess__: (Optional) The callback that is called when sharing stops.\n- __onFailure__: (Optional) The callback that is called if there was an error.\n\n### Description\n\nFunction `nfc.stopHandover` stops sharing data via peer-to-peer.\n\n### Supported Platforms\n\n- Android\n\n## nfc.showSettings\n\nShow the NFC settings on the device.\n\n    nfc.showSettings(success, failure);\n\n### Description\n\nFunction `showSettings` opens the NFC settings for the operating system.\n\n### Parameters\n\n- __success__: Success callback function [optional]\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    nfc.showSettings();\n\n### Supported Platforms\n\n- Android\n- Windows\n- BlackBerry 10\n\n## nfc.enabled\n\nCheck if NFC is available and enabled on this device.\n\nnfc.enabled(onSuccess, onFailure);\n\n### Parameters\n\n- __onSuccess__: The callback that is called when NFC is enabled.\n- __onFailure__: The callback that is called when NFC is disabled or missing.\n\n### Description\n\nFunction `nfc.enabled` explicitly checks to see if the phone has NFC and if NFC is enabled. If\neverything is OK, the success callback is called. If there is a problem, the failure callback\nwill be called with a reason code.\n\nThe reason will be **NO_NFC** if the device doesn't support NFC and **NFC_DISABLED** if the user has disabled NFC.\n\nNote: that on Android the NFC status is checked before every API call **NO_NFC** or **NFC_DISABLED** can be returned in **any** failure function.\n\nWindows will return **NO_NFC_OR_NFC_DISABLED** when NFC is not present or disabled. If the user disabled NFC after the application started, Windows may return **NFC_DISABLED**. Windows checks the NFC status before most API calls, but there are some cases when the NFC state can not be determined.\n\n### Supported Platforms\n\n- Android\n- iOS\n- Windows\n\n## nfc.beginSession\n\n**`beginSession` is deprecated. Use `scanNdef` or `scanTag`**\n\niOS requires you to begin a session before scanning a NFC tag.\n\n    nfc.beginSession(success, failure);\n\n### Description\n\n**`beginSession` is deprecated. Use `scanNdef` or `scanTag`**\n\nFunction `beginSession` starts the [NFCNDEFReaderSession](https://developer.apple.com/documentation/corenfc/nfcndefreadersession) allowing iOS to scan NFC tags. Use [nfc.addNdefListener](#nfcaddndeflistener) to receive the results of the scan.\n\n### Parameters\n\n- __success__: Success callback function called when the session begins [optional]\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    nfc.beginSession();\n\n### Supported Platforms\n\n- iOS\n\n## nfc.invalidateSession\n\n**`invalidateSession` is deprecated. Use `cancelScan``.**\n\nInvalidate the NFC session.\n\n    nfc.invalidateSession(success, failure);\n\n### Description\n\nFunction `invalidateSession` stops the [NFCNDEFReaderSession](https://developer.apple.com/documentation/corenfc/nfcndefreadersession) returning control to your app.\n\n### Parameters\n\n- __success__: Success callback function called when the session in invalidated [optional]\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    nfc.invalidateSession();\n\n### Supported Platforms\n\n- iOS\n\n## nfc.scanNdef\n\nCalling `scanNdef` will being an iOS NFC scanning session. The NFC tag will be returned in a Promise.\n\n    nfc.scanNdef();\n\n### Description\n\nFunction `scanNdef` starts the [NFCNDEFReaderSession](https://developer.apple.com/documentation/corenfc/nfcndefreadersession)  allowing iOS to scan NFC tags.\n\n### Returns\n\n - Promise\n\n### Quick Example\n\n    // Promise\n    nfc.scanNdef().then(\n        tag =\u003e console.log(JSON.stringify(tag)),\n        err =\u003e console.log(err)\n    );\n\n    // Async Await\n    try {\n        let tag = await nfc.scanNdef();\n        console.log(JSON.stringify(tag));\n    } catch (err) {\n        console.log(err);\n    }\n    \n\n### Supported Platforms\n\n- iOS\n\n## nfc.scanTag\n\nCalling `scanTag` will being an iOS NFC scanning session. The NFC tag will be returned in a Promise.\n\n    nfc.scanTag();\n\n### Description\n\nFunction `scanTag` starts the [NFCTagReaderSession](https://developer.apple.com/documentation/corenfc/nfctagreadersession) allowing iOS to scan NFC tags.\n\nThe Tag reader will attempt to get the UID from the NFC Tag. If can also read the UID from some non-NDEF tags. \n\nUse [scanNdef](#nfcscanndef) for reading NFC tags on iOS unless you need to get the tag UID.\n\n### Returns\n\n - Promise\n\n### Quick Example\n\n    // Promise\n    nfc.scanTag().then(\n        tag =\u003e {\n            console.log(JSON.stringify(tag))\n            if (tag.id) {\n                console.log(nfc.bytesToHexString(tag.id));\n            }            \n        },\n        err =\u003e console.log(err)\n    );\n\n    // Async Await\n    try {\n        let tag = await nfc.scanTag();\n        console.log(JSON.stringify(tag));\n        if (tag.id) {\n            console.log(nfc.bytesToHexString(tag.id));\n        }\n    } catch (err) {\n        console.log(err);\n    }\n    \n\n### Supported Platforms\n\n- iOS\n\n\n## nfc.cancelScan\n\nInvalidate the NFC session started by `scanNdef` or `scanTag`.\n\n    nfc.cancelScan();\n    \n### Description\n\nFunction `cancelScan` stops the [NFCReaderSession](https://developer.apple.com/documentation/corenfc/nfcreadersession) returning control to your app.\n\n### Returns\n\n - Promise\n\n### Quick Example\n\n    nfc.cancelScan().then(\n        success =\u003e { console.log('Cancelled NFC session')}, \n        err =\u003e { console.log(`Error cancelling session ${err}`)}\n    );\n\n### Supported Platforms\n\n- iOS\n\n\n# Reader Mode Functions\n\n## nfc.readerMode\n\nRead NFC tags sending the tag data to the success callback.\n\n    nfc.readerMode(flags, readCallback, errorCallback);\n\n### Description\n\nIn reader mode, when a NFC tags is read, the results are returned to read callback as a tag object. Note that the normal event listeners are *not* used in reader mode. The callback receives the tag object *without* the event wrapper.\n\n    {\n        \"isWritable\": true,\n        \"id\": [4, 96, 117, 74, -17, 34, -128],\n        \"techTypes\": [\"android.nfc.tech.IsoDep\", \"android.nfc.tech.NfcA\", \"android.nfc.tech.Ndef\"],\n        \"type\": \"NFC Forum Type 4\",\n        \"canMakeReadOnly\": false,\n        \"maxSize\": 2046,\n        \"ndefMessage\": [{\n            \"id\": [],\n            \"type\": [116, 101, 120, 116, 47, 112, 103],\n            \"payload\": [72, 101, 108, 108, 111, 32, 80, 104, 111, 110, 101, 71, 97, 112],\n            \"tnf\": 2\n        }]\n    }\n\nForeground dispatching and peer-to-peer functions are disabled when reader mode is enabled.\n\nThe flags control which tags are scanned. One benefit to reader mode, is the system sounds can be disabled when a NFC tag is scanned by adding the nfc.FLAG_READER_NO_PLATFORM_SOUNDS flag. See Android's [NfcAdapter.enableReaderMode()](https://developer.android.com/reference/android/nfc/NfcAdapter#enableReaderMode(android.app.Activity,%20android.nfc.NfcAdapter.ReaderCallback,%20int,%20android.os.Bundle)) documentation for more info on the flags.\n\n\n### Parameters\n\n- __flags__:  Flags indicating poll technologies and other optional parameters\n- __readCallback__: The callback that is called when a NFC tag is scanned.\n- __errorCallback__: The callback that is called when NFC is disabled or missing.\n\n### Quick Example\n\n    nfc.readerMode(\n        nfc.FLAG_READER_NFC_A | nfc.FLAG_READER_NO_PLATFORM_SOUNDS, \n        nfcTag =\u003e console.log(JSON.stringify(nfcTag)),\n        error =\u003e console.log('NFC reader mode failed', error)\n    );\n\n### Supported Platforms\n\n- Android\n\n## nfc.disableReaderMode\n\nDisable NFC reader mode.\n\n    nfc.disableNfcReaderMode(successCallback, errorCallback);\n\n### Description\n\nDisable NFC reader mode.\n\n### Parameters\n\n- __successCallback__: The callback that is called when a NFC reader mode is disabled.\n- __errorCallback__: The callback that is called when NFC reader mode can not be disabled.\n\n### Quick Example\n\n    nfc.disableReaderMode(\n        () =\u003e console.log('NFC reader mode disabled'),\n        error =\u003e console.log('Error disabling NFC reader mode', error)\n    )\n\n### Supported Platforms\n\n- Android\n\n\n# Tag Technology Functions\n\nThe tag technology functions provide access to I/O operations on a tag. Connect to a tag, send commands with transceive, close the tag. See the [Android TagTechnology](https://developer.android.com/reference/android/nfc/tech/TagTechnology) and implementations like [IsoDep](https://developer.android.com/reference/android/nfc/tech/IsoDep) and [NfcV](https://developer.android.com/reference/android/nfc/tech/NfcV) for more details. These new APIs are promise based rather than using callbacks.\n\n#### ISO-DEP (ISO 14443-4) Example\n\n    const DESFIRE_SELECT_PICC = '00 A4 04 00 07 D2 76 00 00 85 01 00';\n    const DESFIRE_SELECT_AID = '90 5A 00 00 03 AA AA AA 00'\n\n    async function handleDesfire(nfcEvent) {\n        \n        const tagId = nfc.bytesToHexString(nfcEvent.tag.id);\n        console.log('Processing', tagId);\n\n        try {\n            await nfc.connect('android.nfc.tech.IsoDep', 500);\n            console.log('connected to', tagId);\n            \n            let response = await nfc.transceive(DESFIRE_SELECT_PICC);\n            ensureResponseIs('9000', response);\n            \n            response = await nfc.transceive(DESFIRE_SELECT_AID);\n            ensureResponseIs('9100', response);\n            // 91a0 means the requested application not found\n\n            alert('Selected application AA AA AA');\n\n            // more transcieve commands go here\n            \n        } catch (error) {\n            alert(error);\n        } finally {\n            await nfc.close();\n            console.log('closed');\n        }\n\n    }\n\n    function ensureResponseIs(expectedResponse, buffer) {\n        const responseString = util.arrayBufferToHexString(buffer);\n        if (expectedResponse !== responseString) {\n            const error = 'Expecting ' + expectedResponse + ' but received ' + responseString;\n            throw error;\n        }\n    }\n\n    function onDeviceReady() {\n        nfc.addTagDiscoveredListener(handleDesfire);\n    }\n\n    document.addEventListener('deviceready', onDeviceReady, false);\n\n## nfc.connect\n\nConnect to the tag and enable I/O operations to the tag from this TagTechnology object.\n\n    nfc.connect(tech);\n\n    nfc.connect(tech, timeout);\n\n### Description\n\nFunction `connect` enables I/O operations to the tag from this TagTechnology object. `nfc.connect` should be called after receiving a nfcEvent from the `addTagDiscoveredListener` or the `readerMode` callback. Only one TagTechnology object can be connected to a Tag at a time.\n\nSee Android's [TagTechnology.connect()](https://developer.android.com/reference/android/nfc/tech/TagTechnology.html#connect()) for more info.\n\n### Parameters\n\n- __tech__: The tag technology e.g. android.nfc.tech.IsoDep\n- __timeout__: The transceive(byte[]) timeout in milliseconds [optional]\n\n### Returns\n\n - Promise when the connection is successful, optionally with a maxTransceiveLength attribute in case the tag technology supports it\n\n### Quick Example\n\n    nfc.addTagDiscoveredListener(function(nfcEvent) {\n        nfc.connect('android.nfc.tech.IsoDep', 500).then(\n            () =\u003e console.log('connected to', nfc.bytesToHexString(nfcEvent.tag.id)),\n            (error) =\u003e console.log('connection failed', error)\n        );\n    })\n\n### Supported Platforms\n\n- Android\n\n## nfc.transceive\n\nSend raw command to the tag and receive the response.\n\n    nfc.transceive(data);\n\n### Description\n\nFunction `transceive` sends raw commands to the tag and receives the response. `nfc.connect` must be called before calling `transceive`. Data passed to transceive can be a hex string representation of bytes or an ArrayBuffer. The response is returned as an ArrayBuffer in the promise. \n\nSee Android's documentation [IsoDep.transceive()](https://developer.android.com/reference/android/nfc/tech/IsoDep.html#transceive(byte[])), [NfcV.transceive()](https://developer.android.com/reference/android/nfc/tech/NfcV.html#transceive(byte[])), [MifareUltralight.transceive()](https://developer.android.com/reference/android/nfc/tech/MifareUltralight.html#transceive(byte[])) for more info.\n\n### Parameters\n\n- __data__: a string of hex data or an ArrayBuffer\n\n### Returns\n\n - Promise with the response data as an ArrayBuffer\n\n### Quick Example\n\n    // Promise style\n    nfc.transceive('90 5A 00 00 03 AA AA AA 00').then(\n        response =\u003e console.log(util.arrayBufferToHexString(response)),\n        error =\u003e console.log('Error selecting DESFire application')\n    )\n\n    // async await\n    const response = await nfc.transceive('90 5A 00 00 03 AA AA AA 00');\n    console.log('response =',util.arrayBufferToHexString(response));\n\n### Supported Platforms\n\n- Android\n\n## nfc.close\n\nClose TagTechnology connection.\n\n    nfc.close();\n\n### Description\n\nFunction `close` disabled I/O operations to the tag from this TagTechnology object, and releases resources.\n\nSee Android's [TagTechnology.close()](https://developer.android.com/reference/android/nfc/tech/TagTechnology.html#close()) for more info.\n\n### Parameters\n\n - none\n\n### Returns\n\n - Promise when the connection is successfully closed\n\n### Quick Example\n\n    nfc.transceive().then(\n        () =\u003e console.log('connection closed'),\n        (error) =\u003e console.log('error closing connection', error);\n    )\n\n### Supported Platforms\n\n- Android\n\n# NDEF\n\n\u003e The `ndef` object provides NDEF constants, functions for creating NdefRecords, and functions for converting data.\n\u003e See [android.nfc.NdefRecord](http://developer.android.com/reference/android/nfc/NdefRecord.html) for documentation about constants\n\n## NdefMessage\n\nRepresents an NDEF (NFC Data Exchange Format) data message that contains one or more NdefRecords.\nThis plugin uses an array of NdefRecords to represent an NdefMessage.\n\n## NdefRecord\n\nRepresents a logical (unchunked) NDEF (NFC Data Exchange Format) record.\n\n### Properties\n\n- __tnf__: 3-bit TNF (Type Name Format) - use one of the TNF_* constants\n- __type__: byte array, containing zero to 255 bytes, must not be null\n- __id__: byte array, containing zero to 255 bytes, must not be null\n- __payload__: byte array, containing zero to (2 ** 32 - 1) bytes, must not be null\n\nThe `ndef` object has a function for creating NdefRecords\n\n    var type = \"text/pg\",\n        id = [],\n        payload = nfc.stringToBytes(\"Hello World\"),\n        record = ndef.record(ndef.TNF_MIME_MEDIA, type, id, payload);\n\nThere are also helper functions for some types of records\n\nCreate a URI record\n\n    var record = ndef.uriRecord(\"http://chariotsolutions.com\");\n\nCreate a plain text record\n\n    var record = ndef.textRecord(\"Plain text message\");\n\nCreate a mime type record\n\n    var mimeType = \"text/pg\",\n        payload = \"Hello Phongap\",\n        record = ndef.mimeMediaRecord(mimeType, nfc.stringToBytes(payload));\n\nCreate an Empty record\n\n    var record = ndef.emptyRecord();\n\nCreate an Android Application Record (AAR)\n\n    var record = ndef.androidApplicationRecord('com.example');\n\nSee `ndef.record`, `ndef.textRecord`, `ndef.mimeMediaRecord`, and `ndef.uriRecord`.\n\nThe Ndef object has functions to convert some data types to and from byte arrays.\n\nSee the [phonegap-nfc.js](https://github.com/chariotsolutions/phonegap-nfc/blob/master/www/phonegap-nfc.js) source for more documentation.\n\n# Events\n\nEvents are fired when NFC tags are read.  Listeners are added by registering callback functions with the `nfc` object.  For example ` nfc.addNdefListener(myNfcListener, win, fail);`\n\n## NfcEvent\n\n### Properties\n\n- __type__: event type\n- __tag__: Ndef tag\n\n### Types\n\n- tag\n- ndef-mime\n- ndef\n- ndef-formatable\n\nThe tag contents are platform dependent.\n\n`id` and `techTypes` may be included when scanning a tag on Android.  `serialNumber` may be included on BlackBerry 7.\n\n`id` and `serialNumber` are different names for the same value.  `id` is typically displayed as a hex string `nfc.bytesToHexString(tag.id)`.\n\nWindows, Windows Phone 8, and BlackBerry 10 read the NDEF information from a tag, but do not have access to the tag id or other meta data like capacity, read-only status or tag technologies.\n\nAssuming the following NDEF message is written to a tag, it will produce the following events when read.\n\n    var ndefMessage = [\n        ndef.createMimeRecord('text/pg', 'Hello PhoneGap')\n    ];\n\n#### Sample Event on Android\n\n    {\n        type: 'ndef',\n        tag: {\n            \"isWritable\": true,\n            \"id\": [4, 96, 117, 74, -17, 34, -128],\n            \"techTypes\": [\"android.nfc.tech.IsoDep\", \"android.nfc.tech.NfcA\", \"android.nfc.tech.Ndef\"],\n            \"type\": \"NFC Forum Type 4\",\n            \"canMakeReadOnly\": false,\n            \"maxSize\": 2046,\n            \"ndefMessage\": [{\n                \"id\": [],\n                \"type\": [116, 101, 120, 116, 47, 112, 103],\n                \"payload\": [72, 101, 108, 108, 111, 32, 80, 104, 111, 110, 101, 71, 97, 112],\n                \"tnf\": 2\n            }]\n        }\n    }\n\n#### Sample Event on BlackBerry 7\n\n    {\n        type: 'ndef',\n        tag: {\n            \"tagType\": \"4\",\n            \"isLocked\": false,\n            \"isLockable\": false,\n            \"freeSpaceSize\": \"2022\",\n            \"serialNumberLength\": \"7\",\n            \"serialNumber\": [4, 96, 117, 74, -17, 34, -128],\n            \"name\": \"Desfire EV1 2K\",\n            \"ndefMessage\": [{\n                \"tnf\": 2,\n                \"type\": [116, 101, 120, 116, 47, 112, 103],\n                \"id\": [],\n                \"payload\": [72, 101, 108, 108, 111, 32, 80, 104, 111, 110, 101, 71, 97, 112]\n            }]\n        }\n    }\n\n#### Sample Event on Windows, BlackBerry 10, or Windows Phone 8\n\n    {\n        type: 'ndef',\n        tag: {\n            \"ndefMessage\": [{\n                \"tnf\": 2,\n                \"type\": [116, 101, 120, 116, 47, 112, 103],\n                \"id\": [],\n                \"payload\": [72, 101, 108, 108, 111, 32, 80, 104, 111, 110, 101, 71, 97, 112]\n            }]\n        }\n    }\n\n## Getting Details about Events\n\nThe raw contents of the scanned tags are written to the log before the event is fired.  Use `adb logcat` on Android and Event Log (hold alt + lglg) on BlackBerry.\n\nYou can also log the tag contents in your event handlers.  `console.log(JSON.stringify(nfcEvent.tag))`  Note that you want to stringify the tag not the event to avoid a circular reference.\n\n# Platform Differences\n\n## Non-NDEF Tags\n\nOnly Android and BlackBerry 7 can read data from non-NDEF NFC tags. Newer Windows Phones with NXP PN427 chipset can read non-NDEF tags, but can not get any tag meta data.\n\n## Mifare Classic Tags\n\nBlackBerry 7, BlackBerry 10 and many newer Android phones will not read Mifare Classic tags.  Mifare Ultralight tags will work since they are NFC Forum Type 2 tags. Newer Windows 8.1 phones (Lumia 640) can read Mifare Classic tags.\n\n## Tag Id and Meta Data\n\nWindows Phone 8, BlackBerry 10, and Windows read the NDEF information from a tag, but do not have access to the tag id or other meta data like capacity, read-only status or tag technologies.\n\n## Multiple Listeners\n\nMultiple listeners can be registered in JavaScript. e.g. addNdefListener, addTagDiscoveredListener, addMimeTypeListener.\n\nOn Android, only the most specific event will fire.  If a Mime Media Tag is scanned, only the addMimeTypeListener callback is called and not the callback defined in addNdefListener. You can use the same event handler for multiple listeners.\n\nFor Windows, this plugin mimics the Android behavior. If an ndef event is fired, a tag event will not be fired. You should receive one event per tag.\n\nOn BlackBerry 7, all the events fire if a Mime Media Tag is scanned.\n\n## addTagDiscoveredListener\n\nOn Android, addTagDiscoveredListener scans non-NDEF tags and NDEF tags. The tag event does NOT contain an ndefMessage even if there are NDEF messages on the tag.  Use addNdefListener or addMimeTypeListener to get the NDEF information.\n\nWindows can scan non-NDEF (unformatted) tags using addTagDiscoveredListener. The tag event will not include any data.\n\nOn BlackBerry 7, addTagDiscoveredListener does NOT scan non-NDEF tags.  Webworks returns the ndefMessage in the event.\n\n### Non-NDEF tag scanned with addTagDiscoveredListener on *Android*\n\n    {\n        type: 'tag',\n        tag: {\n            \"id\": [-81, 105, -4, 64],\n            \"techTypes\": [\"android.nfc.tech.MifareClassic\", \"android.nfc.tech.NfcA\", \"android.nfc.tech.NdefFormatable\"]\n        }\n    }\n\n\n### NDEF tag scanned with addTagDiscoveredListener on *Android*\n\n    {\n        type: 'tag',\n        tag: {\n            \"id\": [4, 96, 117, 74, -17, 34, -128],\n            \"techTypes\": [\"android.nfc.tech.IsoDep\", \"android.nfc.tech.NfcA\", \"android.nfc.tech.Ndef\"]\n        }\n    }\n\n### Non-NDEF tag scanned with addTagDiscoveredListener on *Windows*\n\n    {\n        type: 'tag',\n        tag: {\n        }\n    }\n\n# BlackBerry 10 Invoke Target\n\nThis plugin uses the [BlackBerry Invocation Framework](http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/receiving_invocation.html) to read NFC tags on BlackBerry 10. This means that you need to register an invoke target in the config.xml.\n\nIf your project supports multiple platforms, copy www/config.xml to merges/config.xml and add a `rim:invoke-target` tag. The invoke-target determines which tags your app will scan when it is running. If your application is not running, BlackBerry will launch it when a matching tag is scanned.\n\nThis sample configuration attempts to open any NDEF tag.\n\n    \u003crim:invoke-target id=\"your.unique.id.here\"\u003e\n        \u003ctype\u003eAPPLICATION\u003c/type\u003e\n        \u003cfilter\u003e\n            \u003caction\u003ebb.action.OPEN\u003c/action\u003e\n            \u003cmime-type\u003eapplication/vnd.rim.nfc.ndef\u003c/mime-type\u003e\n            \u003c!-- any TNF Empty(0), Well Known(1), MIME Media(2), Absolute URI(3), External(4) --\u003e\n            \u003cproperty var=\"uris\" value=\"ndef://0,ndef://1,ndef://2,ndef://3,ndef://4\" /\u003e\n        \u003c/filter\u003e\n    \u003c/rim:invoke-target\u003e\n\nYou can configure you application to handle only certain tags.\n\nFor example to scan only MIME Media tags of type \"text/pg\" use\n\n    \u003crim:invoke-target id=\"your.unique.id.here\"\u003e\n        \u003ctype\u003eAPPLICATION\u003c/type\u003e\n        \u003cfilter\u003e\n            \u003caction\u003ebb.action.OPEN\u003c/action\u003e\n            \u003cmime-type\u003eapplication/vnd.rim.nfc.ndef\u003c/mime-type\u003e\n            \u003c!-- TNF MIME Media(2) with type \"text/pg\" --\u003e\n            \u003cproperty var=\"uris\" value=\"ndef://2/text/pg\" /\u003e\n        \u003c/filter\u003e\n    \u003c/rim:invoke-target\u003e\n\nOr to scan only Plain Text tags use\n\n    \u003crim:invoke-target id=\"your.unique.id.here\"\u003e\n        \u003ctype\u003eAPPLICATION\u003c/type\u003e\n        \u003cfilter\u003e\n            \u003caction\u003ebb.action.OPEN\u003c/action\u003e\n            \u003cmime-type\u003eapplication/vnd.rim.nfc.ndef\u003c/mime-type\u003e\n            \u003c!-- TNF Well Known(1), RTD T --\u003e\n            \u003cproperty var=\"uris\" value=\"ndef://1/T\" /\u003e\n        \u003c/filter\u003e\n    \u003c/rim:invoke-target\u003e\n\nSee the [BlackBerry documentation](http://developer.blackberry.com/native/documentation/cascades/device_comm/nfc/receiving_content.html) for more info.\n\n# Launching your Android Application when Scanning a Tag\n\nOn Android, intents can be used to launch your application when a NFC tag is read.  This is optional and configured in AndroidManifest.xml.\n\n    \u003cintent-filter\u003e\n      \u003caction android:name=\"android.nfc.action.NDEF_DISCOVERED\" /\u003e\n      \u003cdata android:mimeType=\"text/pg\" /\u003e\n      \u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n    \u003c/intent-filter\u003e\n\nNote: `data android:mimeType=\"text/pg\"` should match the data type you specified in JavaScript\n\nWe have found it necessary to add `android:noHistory=\"true\"` to the activity element so that scanning a tag launches the application after the user has pressed the home button.\n\nSee the Android documentation for more information about [filtering for NFC intents](http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#ndef-disc).\n\nTesting\n=======\n\nTests require the [Cordova Plugin Test Framework](https://github.com/apache/cordova-plugin-test-framework)\n\nCreate a new project\n\n    git clone https://github.com/chariotsolutions/phonegap-nfc\n    cordova create nfc-test com.example.nfc.test NfcTest\n    cd nfc-test\n    cordova platform add android\n    cordova plugin add ../phonegap-nfc\n    cordova plugin add ../phonegap-nfc/tests\n    cordova plugin add https://github.com/apache/cordova-plugin-test-framework.git\n\nChange the start page in `config.xml`\n\n    \u003ccontent src=\"cdvtests/index.html\" /\u003e\n\nRun the app on your phone\n\n    cordova run\n\n\nSample Projects\n================\n\n- [Ionic NFC Reader](https://github.com/don/ionic-nfc-reader)\n- [NFC Reader](https://github.com/don/phonegap-nfc-reader)\n- [NFC Writer](https://github.com/don/phonegap-nfc-writer)\n- [NFC Peer to Peer](https://github.com/don/phonegap-p2p)\n- [ApacheCon 2014 Demos](https://github.com/don/apachecon-nfc-demos)\n- [Rock Paper Scissors](https://github.com/don/rockpaperscissors) *Android 2.x only*\n\nHCE\n=======\n\nFor Host Card Emulation (HCE), try the [Cordova HCE Plugin](https://github.com/don/cordova-plugin-hce).\n\nBook\n=======\nNeed more info? Check out my book \u003ca href=\"http://www.tkqlhce.com/click-7835726-11260198-1430755877000?url=http%3A%2F%2Fshop.oreilly.com%2Fproduct%2F0636920021193.do%3Fcmp%3Daf-prog-books-videos-product_cj_9781449372064_%2525zp\u0026cjsku=0636920021193\" target=\"_top\"\u003e\nBeginning NFC: Near Field Communication with Arduino, Android, and PhoneGap\u003c/a\u003e\u003cimg src=\"http://www.lduhtrp.net/image-7835726-11260198-1430755877000\" width=\"1\" height=\"1\" border=\"0\"/\u003e\n\n\u003ca href=\"http://www.kqzyfj.com/click-7835726-11260198-1430755877000?url=http%3A%2F%2Fshop.oreilly.com%2Fproduct%2F0636920021193.do%3Fcmp%3Daf-prog-books-videos-product_cj_9781449372064_%2525zp\u0026cjsku=0636920021193\" target=\"_top\"\u003e\u003cimg src=\"http://akamaicovers.oreilly.com/images/0636920021193/cat.gif\" border=\"0\" alt=\"Beginning NFC\"/\u003e\u003c/a\u003e\u003cimg src=\"http://www.ftjcfx.com/image-7835726-11260198-1430755877000\" width=\"1\" height=\"1\" border=\"0\"/\u003e\n\nLicense\n================\n\nThe MIT License\n\nCopyright (c) 2011-2020 Chariot Solutions\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchariotsolutions%2Fphonegap-nfc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchariotsolutions%2Fphonegap-nfc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchariotsolutions%2Fphonegap-nfc/lists"}