react-native-nfc-manager 3.13.4 → 3.13.5

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.
@@ -1034,8 +1034,12 @@ class NfcManager extends ReactContextBaseJavaModule implements ActivityEventList
1034
1034
  return;
1035
1035
  }
1036
1036
 
1037
- currentActivity.startActivity(new Intent(Settings.ACTION_NFC_SETTINGS));
1038
- callback.invoke();
1037
+ try {
1038
+ currentActivity.startActivity(new Intent(Settings.ACTION_NFC_SETTINGS));
1039
+ callback.invoke(null, true);
1040
+ } catch (Exception ex) {
1041
+ callback.invoke(null, false);
1042
+ }
1039
1043
  }
1040
1044
 
1041
1045
  @ReactMethod
package/index.d.ts CHANGED
@@ -271,7 +271,7 @@ declare module 'react-native-nfc-manager' {
271
271
  /**
272
272
  * Android only
273
273
  */
274
- goToNfcSetting(): Promise<any>;
274
+ goToNfcSetting(): Promise<boolean>;
275
275
  getLaunchTagEvent(): Promise<TagEvent | null>;
276
276
  transceive(bytes: number[]): Promise<number[]>;
277
277
  getMaxTransceiveLength(): Promise<number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nfc-manager",
3
- "version": "3.13.4",
3
+ "version": "3.13.5",
4
4
  "description": "A NFC module for react native.",
5
5
  "main": "src/index.js",
6
6
  "repository": {