phonegap-nfc
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -0,1 +1,5 @@ | ||
= 0.6.5 = | ||
Add nfc.showSettings for Android and BlackBerry 10 #147 | ||
Fix package name for Blackberry 10 | ||
= 0.6.4 = | ||
@@ -2,0 +6,0 @@ Fix Android compile issue #192 |
{ | ||
"name": "phonegap-nfc", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"description": "Near Field Communication (NFC) Plugin. Read and write NDEF messages to tags or share NDEF messages with peers.", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -58,2 +58,3 @@ PhoneGap NFC Plugin | ||
- [nfc.enabled](#nfcenabled) | ||
- [nfc.showSettings](#nfcshowsettings) | ||
@@ -424,2 +425,25 @@ ## nfc.addNdefListener | ||
## showSettings | ||
Show the NFC settings on the device. | ||
nfc.showSettings(success, failure); | ||
### Description | ||
Function `showSettings` opens the NFC settings for the operating system. | ||
### Parameters | ||
- __success__: Success callback function [optional] | ||
- __failure__: Error callback function, invoked when error occurs. [optional] | ||
### Quick Example | ||
nfc.showSettings(); | ||
### Supported Platforms | ||
- Android | ||
## nfc.enabled | ||
@@ -426,0 +450,0 @@ |
@@ -52,2 +52,8 @@ /*jslint browser: true, unused: vars, quotmark: double */ | ||
// clobber existing showSettings function | ||
nfc.showSettings = function(success, failure) { | ||
"use strict"; | ||
blackberry.invoke.invoke({ uri: "settings://nfc" }, success, failure); | ||
} | ||
// takes an ndefMessage from the success callback and fires a javascript event | ||
@@ -69,4 +75,4 @@ var proxy = function(ndefMessageAsString) { | ||
document.addEventListener("ndef", callback, false); | ||
cordova.exec(proxy, failure, "com.chariotsolutions.nfc.plugin", "registerNdef", []); | ||
cordova.exec(proxy, failure, "phonegap-nfc", "registerNdef", []); | ||
success(); // assume success | ||
}; |
@@ -484,2 +484,6 @@ /*jshint bitwise: false, camelcase: false, quotmark: false, unused: vars */ | ||
cordova.exec(win, fail, "NfcPlugin", "removeNdef", []); | ||
}, | ||
showSettings: function (win, fail) { | ||
cordova.exec(win, fail, "NfcPlugin", "showSettings", []); | ||
} | ||
@@ -486,0 +490,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210204
1100
801