@ahback wrote:
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(r) { //ACR.metadata = ACR.convertMetadata(r); //r.metadata = ACR.metadata; ACR.metadata = r.metadata; ACR.TagSuccessListener(r); }, function(r) { //ACR.metadata = {}; ACR.TagFailureListener(r); }, "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
Posts: 1
Participants: 1