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
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,17 @@ This is a simple sample app demostrating the usage of the [Web NFC API](https://
6
6
7
7
This is the [sample app](https://react-nfc-90146.web.app/) in action.
8
8
9
+

10
+
11
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
12
+
9
13
### WTF is NFC?
10
14
11
15
NFC stands for **_Near-Field Communication_**. NFC is a set of communication protocols for communication between two electronic devices.
12
16
13
17
Electromagnetic fields can be used to transmit data or induce electrical currents in a receiving device. Passive NFC devices draw power from the fields produced by active devices, but the range is short.
14
18
15
-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
19
+

16
20
17
21
You can buy NFC Tags on [Amazon](https://www.amazon.com/gp/product/B0727NYX3B/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1). These tags can contain up to 540KB of info.
18
22
@@ -59,12 +63,12 @@ const scan = async() =>
59
63
60
64
console.log("Scan started successfully.");
61
65
ndef.onreadingerror= () => {
62
-
console.log("Cannot read data from the NFC tag. Try another one?");
66
+
console.log("Cannot read data from the NFC tag. Try another one?");
63
67
};
64
68
65
69
ndef.onreading= (event) => {
66
-
console.log("NDEF message read.");
67
-
onReading(event); //Find function below
70
+
console.log("NDEF message read.");
71
+
onReading(event); //Find function below
68
72
};
69
73
} catch (error) {
70
74
console.log(`Error! Scan failed to start: ${error}.`);
0 commit comments