You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
PhoneGap NFC Plugin
1
+
PhoneGap NFC Plugin (With Fix for Android 12 and above)
2
2
==========================
3
3
4
4
The NFC plugin allows you to read and write NFC tags. You can also beam to, and receive from, other NFC enabled devices.
@@ -72,6 +72,20 @@ You must call [nfc.scanNdef](#nfcscanndef) and [nfc.scanTag](#nfcscantag) before
72
72
73
73
Writing NFC tags on iOS uses the same [nfc.write](#nfcwrite) function as other platforms. Although it's the same function, the behavior is different on iOS. Calling `nfc.write` on an iOS device will start a new scanning session and write data to the scanned tag.
74
74
75
+
To localize alert message strings use `Localizable.strings` files with these keys:
76
+
`"NFCHoldNearTag": "Hold near NFC tag to scan."`
77
+
`"NFCHoldNearWritableTag": "Hold near writable NFC tag to update."`
78
+
`"NFCMoreThanOneTag": "More than 1 tag detected. Please remove all tags and try again."`
79
+
`"NFCTagRead": "Tag successfully read."`
80
+
`"NFCDataWrote": "Wrote data to NFC tag."`
81
+
`"NFCDataWriteFailed": "Write failed."`
82
+
`"NFCDataReadFailed": "Read Failed."`
83
+
`"NFCReadOnlyTag": "Tag is read only."`
84
+
`"NFCUnknownNdefTag": "Unknown NDEF tag status."`
85
+
`"NFCNotNdefCompliant": "Tag is not NDEF compliant."`
86
+
`"NFCErrorTagStatus": "Error getting tag status."`
87
+
`"NFCErrorTagConnection": "Error connecting to tag."`
88
+
75
89
# NFC
76
90
77
91
> The nfc object provides access to the device's NFC sensor.
@@ -1349,4 +1363,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1349
1363
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1350
1364
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1351
1365
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
[selfcloseSession:session withError:@"Tag is not NDEF compliant."]; // alternate message "Tag does not support NDEF."
398
+
[selfcloseSession:session withError:[selflocalizeString:@"NFCNotNdefCompliant"defaultValue:@"Tag is not NDEF compliant."]]; // alternate message "Tag does not support NDEF."
399
399
break;
400
400
case NFCNDEFStatusReadOnly:
401
-
[selfcloseSession:session withError:@"Tag is read only."];
401
+
[selfcloseSession:session withError:[selflocalizeString:@"NFCReadOnlyTag"defaultValue:@"Tag is read only."]];
0 commit comments