https://github.com/don/nfc-launch
Demo - launch a Cordova app when scanning a NFC tag
https://github.com/don/nfc-launch
Last synced: 7 months ago
JSON representation
Demo - launch a Cordova app when scanning a NFC tag
- Host: GitHub
- URL: https://github.com/don/nfc-launch
- Owner: don
- Created: 2015-06-02T16:24:43.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-02T16:25:06.000Z (about 11 years ago)
- Last Synced: 2025-01-31T21:34:48.366Z (over 1 year ago)
- Language: Java
- Size: 2.34 MB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NFC Launch
Launch a Cordova app by scanning a NFC tag.
Uses [phonegap-nfc](http://github.com/chariotsolutions/phonegap-nfc).
### Create Sample NFC Tag
Use [NFC Tag Writer](https://play.google.com/store/apps/details?id=com.nxp.nfc.tagwriter&hl=en) to create a NFC tag with the following data
* TNF: Well Known
* Type: URI
* Payload: http://example.com/foo
Details
* Launch NFC Tag Writer
* Choose Write tags
* Choose New dataset
* Choose Link
* Enter http://example.com/foo in the Website field
* Do **not** enter anything in the optional title field.
### Intent Filter
The intent filter is defined in AndroidManifest.xml
# Compile and Run
Build and deploy to an Android phone using Cordova 5.0.0
cordova run --device
While the app is running, Scan an NFC tag to ensure foreground dispatch works.
Close the app
Scan the NFC tag you created. The app will launch and display the tag info.