Comments (5)
With Android you can launch your application when a NFC tag is scanned. This is done outside the plugin by defining an intent in the AndroidManifest.xml.
Once your app is opened, you need to process the nfcEvent, read the data and decide what to do.
You can see an example in https://github.com/don/phonegap-nfc-reader. This application launches when a NFC tag with a Mime Media Message of type "text/pg" is scanned.
from phonegap-nfc.
Thank you so much for your help! So could an NFC tag simultaneously launch
an application and transfer a bit of contact information to the app and
then open that contact information within the app? I'd like it to do both
but I am not sure it is possible.
Thanks again.
On Thu, Jan 31, 2013 at 4:56 PM, Don Coleman [email protected]:
With Android you can launch your application when a NFC tag is scanned.
This is done outside the plugin by defining an intent in the
AndroidManifest.xml.Once your app is opened, you need to process the nfcEvent, read the data
and decide what to do.You can see an example in https://github.com/don/phonegap-nfc-reader.
This application launches when a NFC tag with a Mime Media Message of type
"text/pg" is scanned.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-12952387.
from phonegap-nfc.
Yes it can do both.
The intent in the AndroidManifest.xml tells the application which tags should open the application.
Once the application is opened, you will receive the contents of the NFC tag in the event listener that you registered. For example nfc.addMimeTypeListener(onNfc, success, failure)
In your implementation of the listener (onNfc in the example above), it is your application's responsibility to do something with the data. In your case, display the contact information to the user.
from phonegap-nfc.
Hi Don, An extended question to this and please help me understand it better. After reading the NFC tag can it open an app+open a particular content within the app.
Ex: News App, When I tap the NFC chip, 1. It opens News app + 2. Open Sports category news.
Thanks in advance.
from phonegap-nfc.
As mentioned in the comment just above yours, you can simply grab the data in the tag, and based on it, you can open the category
from phonegap-nfc.
Related Issues (20)
- Support for ISO18092 tags in iOS
- Writing NFC Tag didn't succeeded every time in Quasar Cordova mobile App
- android NFC Card HOT 1
- NFC scanning not working IOS HOT 7
- SerialNumber not being retrieved on iOS HOT 1
- Android 12 SDK not fire scan event HOT 3
- Ionic NFC on Android 12 Crushing the App HOT 8
- Ionic Android 13 makeReadOnly java.io.IOException HOT 3
- Does not work with Xcode 14.3 and iOS 16.4 HOT 3
- Does this plugin support BAC ( Basic Access Control ) to read NFC Chip on ePassport ? HOT 1
- NFC Writting Error - Only one tag technology can be connected at a time HOT 6
- Ionic capacitor targetsdk 33 app crash with plugin is installed without nfc plugin work works ok HOT 28
- On ios while reading tag give error 203. "System resources unavailable HOT 7
- NFC Tag Writing Issue HOT 1
- The first two Characters are getting trimmed
- Android Api 34 error Android 14
- Android Api 34 error Android 14 HOT 11
- NfcPlugin.java:554
- NEW Repo for issues and contributions HOT 9
- Read sectors and blocks of my mifare card with C#
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phonegap-nfc.