react-native-nfc-manager 4.0.0-beta.2 → 4.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -12,6 +12,11 @@ Made with ❤️ by [whitedogg13](https://github.com/whitedogg13) and [revteltec
|
|
|
12
12
|
|
|
13
13
|
> Special thanks to [javix64](https://github.com/javix64) for restructuring the documentation!
|
|
14
14
|
|
|
15
|
+
## Version Notes
|
|
16
|
+
|
|
17
|
+
- `v3` only supports legacy architecture (latest release is `v3.16.2`).
|
|
18
|
+
- `v4` supports new architecture (still in beta, latest release is `v4.0.0-beta.3`) .
|
|
19
|
+
|
|
15
20
|
## Table of Contents
|
|
16
21
|
|
|
17
22
|
1. [Installation](#installation)
|
|
@@ -94,12 +94,6 @@ class NfcManager extends NativeNfcManagerSpec implements ActivityEventListener,
|
|
|
94
94
|
return "NfcManager";
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
@ReactMethod
|
|
98
|
-
@Override
|
|
99
|
-
public void echo(String value, Callback callback) {
|
|
100
|
-
callback.invoke(null, value);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
97
|
@Override
|
|
104
98
|
public Map<String, Object> getConstants() {
|
|
105
99
|
final Map<String, Object> constants = new HashMap<>();
|
|
@@ -1309,9 +1303,9 @@ class NfcManager extends NativeNfcManagerSpec implements ActivityEventListener,
|
|
|
1309
1303
|
try {
|
|
1310
1304
|
if (isReaderModeEnabled) {
|
|
1311
1305
|
if (enable) {
|
|
1312
|
-
Log.i(LOG_TAG, "enableReaderMode: "
|
|
1306
|
+
Log.i(LOG_TAG, String.format("enableReaderMode, flags: %d, delay: %d ms", readerModeFlags, readerModeDelay));
|
|
1313
1307
|
Bundle readerModeExtras = new Bundle();
|
|
1314
|
-
readerModeExtras.putInt(NfcAdapter.EXTRA_READER_PRESENCE_CHECK_DELAY, readerModeDelay
|
|
1308
|
+
readerModeExtras.putInt(NfcAdapter.EXTRA_READER_PRESENCE_CHECK_DELAY, readerModeDelay);
|
|
1315
1309
|
nfcAdapter.enableReaderMode(currentActivity, new NfcAdapter.ReaderCallback() {
|
|
1316
1310
|
@Override
|
|
1317
1311
|
public void onTagDiscovered(Tag tag) {
|
package/ios/NfcManager.mm
CHANGED
|
@@ -599,10 +599,6 @@ continueUserActivity:(NSUserActivity *)userActivity
|
|
|
599
599
|
}
|
|
600
600
|
#endif
|
|
601
601
|
|
|
602
|
-
- (void)echo:(NSString *)value callback:(RCTResponseSenderBlock)callback {
|
|
603
|
-
callback(@[[NSNull null], value]);
|
|
604
|
-
}
|
|
605
|
-
|
|
606
602
|
- (void)hasTagEventRegistration:(RCTResponseSenderBlock)callback {
|
|
607
603
|
// bypass, Android's interface
|
|
608
604
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@ import type {TurboModule} from 'react-native';
|
|
|
2
2
|
import {TurboModuleRegistry} from 'react-native';
|
|
3
3
|
|
|
4
4
|
export interface Spec extends TurboModule {
|
|
5
|
-
echo(value: string, callback: (err?: string, resp?: string) => void): void;
|
|
6
5
|
isSupported(tech: string, callback: (err?: string, resp?: boolean) => void): void;
|
|
7
6
|
isEnabled(callback: (err?: string, resp?: boolean) => void): void;
|
|
8
7
|
start(callback: (err?: string) => void): void;
|
package/src/NfcManager.js
CHANGED