Git Product home page Git Product logo

Comments (5)

don avatar don commented on July 25, 2024

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.

https://github.com/chariotsolutions/phonegap-nfc#launching-your-application-when-scanning-a-tag-android

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.

ikikik avatar ikikik commented on July 25, 2024

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.

https://github.com/chariotsolutions/phonegap-nfc#launching-your-application-when-scanning-a-tag-android

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.

don avatar don commented on July 25, 2024

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.

anoopdk avatar anoopdk commented on July 25, 2024

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.

sangeetjass avatar sangeetjass commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.