Code Monkey home page Code Monkey logo

ionic-nfc-reader's Introduction

PhoneGap NFC Reader

This project demonstrates reading NFC tags using Apache Cordova and phonegap-nfc.

This is an Ionic Framework version 1 port of phonegap-nfc-reader.

Your computer needs to be set up for Cordova and Android development.

Install Ionic

npm install -g ionic

Clone the project

git clone https://github.com/don/ionic-nfc-reader.git

Plug in your NFC enabled Android phone. Then build and run the app.

cd ionic-nfc-reader/
ionic cordova run android --device

Note this is an old Ionic v1 project. It was updated in June 2018 to run with the newer Ionic v3 command line tools which still support Ionic v1.

Most of the code in this project is generated boilerplate. The files I modified are

If you're starting a new project with Ionic v3, take a look at the Ionic Native wrappers for phonegap-nfc.

ionic-nfc-reader's People

Contributors

don avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-nfc-reader's Issues

Error on plugin add

I have a simple ionic project, but I'm unable to install the plugin. It seems that the plugin is a PhoneGap one only. But this example is for ionic. What am I missing ?

$ cordova plugin add com.chariotsolutions.nfc.plugin
Error: Registry returned 404 for GET on https://registry.npmjs.org/com.chariotsolutions.nfc.plugin

nfc not reading anything

Hi, I just pulled this remove with phgonegap plugin (v 0.6.6) for a nfc enabled ionic 1 application on my android onplus 3t phone.

I can hear the foreground of the nfc service on my phone making the sound and recognizing the tag but this demo does not recognize it.

however my phone does auto detection to the tags and I downloaded NFC tools app from playstore and that too can read the tag im trying to get this reader demo to read.

im just trying to get the callbacks to fire but it doesnt seem to be firing at all!

App does not read NFC

Hi Don,

Thanks for making this example. I'm testing your code using google nexus 7 (ionic run --device), however, it does not seem to read the nfc, or display any feedback. Any idea why this is so? Thanks.

I can't read nfc card

I can't read nfc card with this app and the phone recommended other app when I crediting card. And I can read nfc card with recommended app

Samsung s6 NFC tag type not supported

When I use a NFC tag my device is giving a warning text NFC tag type not supported how can i overcome this message. but the NFC tag is been read by the application and nfc-phonegap plugin. the NFC tag model used is "HID 1430 1L"
screenshot_2016-01-29-19-49-46

These messages are coming in Sony mobiles as well.

Scan nfc the first time, app doesn't get the nfc message. But then scan again, I can got the msg.

Hi, I use ionic and use your code, when the app starts , I scan nfc, my phone give other app options to scan nfc and my app got nothing. I cancel the options then scan again, my app got the nfc message right. How can I make the app get the nfc message at the first time? where did I do wrong? I see nothing special in your config.xml or some where other place. Could you help me? Thank you very much.

scan rfid card result not 10 digit number

how to make result like when we scan rfid with scanner, result 10 digit number. thanks
why my result like these picturre ?
my code :
$scope.onNfc = function( nfcEvent )
{
console.log(nfcEvent);
// display the tag as JSON
var tag = nfcEvent.tag;
var tagId = nfc.bytesToHexString(tag.id);
alert(tagId);
}
$scope.onNfcSuccess = function (result)
{
alert('NFC listening');
}

		$scope.onNfcFail = function (result) {
			alert( 'NFC failed: ' + result );
		}
		nfc.addTagDiscoveredListener($scope.onNfc, $scope.onNfcSuccess, $scope.onNfcFail);		

nfc

Writing to NFC Media

Hi Don,

Thanks heaps for this example, it has helped me lots.

Just wondering though, is it possible to port the existing code in order to allow writing to the tags?

For example, on a ng-submit/ng-click event you could write the contents of the form as a specific type of NDEF message and then write it to a tag?

Thanks in advance!

App does not read NFC tag

I've tried to run on Android, in LG G3 device, and can't run NFC tags...

With other apps I can read normally, but with this I can't.

Why?

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.