How to use Plugin


#1

Sorry, I am new in Ionic Developer, I had make a plug in with

cordova plugin add https://github.com/MorningCoffeeDev/ACR-NFC-Reader-PhoneGap-Plugin

but I don’t know how to control the function inside the Plug in js

Do someone help me on it ?

The JS File content is
cordova.define(“com.frankgreen.ACR-NFC-Reader-PhoneGap-Plugin”, function(require, exports, module) { (function() {

var exec = require(‘cordova/exec’);

var ACR = {};

ACR.TagSuccessListener = function() {};
ACR.TagFailureListener = function() {};
ACR.start = function() {
if (cordova.platformId === “android”) { setTimeout(function() { cordova.exec(function® { //ACR.metadata = ACR.convertMetadata®; //r.metadata = ACR.metadata; ACR.metadata = r.metadata; ACR.TagSuccessListener®; }, function® { //ACR.metadata = {}; ACR.TagFailureListener®; }, “ACRNFCReaderPhoneGapPlugin”, “listen”, []); }, 10); } };

})();
});

I just want to call “ACR.start” in Ionic angular function.

P/S: Full function is in https://github.com/MorningCoffeeDev/ACR-NFC-Reader-PhoneGap-Plugin/blob/master/www/ACR-NFC-Reader-PhoneGap-Plugin.js

Sorry for my english.

Thank you very much