Skip to content

Commit 5b0c2f1

Browse files
committed
Return BeaconsEventEmitter as well from structure
1 parent 33ed9e5 commit 5b0c2f1

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

lib/next/new.module.android.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
} from './module.types';
1818

1919
const BeaconsManager: BeaconsManagerANDROID = RN.NativeModules.BeaconsAndroidModule;
20+
const BeaconsEventEmitter = RN.DeviceEventEmitter;
2021

2122
const ARMA_RSSI_FILTER = BeaconsManager.ARMA_RSSI_FILTER;
2223
const RUNNING_AVG_RSSI_FILTER = BeaconsManager.RUNNING_AVG_RSSI_FILTER;
@@ -238,6 +239,8 @@ function stopRangingBeaconsInRegion(
238239
}
239240

240241
module.exports = {
242+
BeaconsEventEmitter,
243+
241244
setHardwareEqualityEnforced,
242245
detectIBeacons,
243246
detectAltBeacons,

lib/next/new.module.ios.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type {
99
} from './module.types';
1010

1111
const BeaconsManager: BeaconsManagerIOS = RN.NativeModules.RNiBeacon;
12+
const BeaconsEventEmitter = new RN.NativeEventEmitter(BeaconsManager);
1213

1314
/**
1415
* request always authorization (mandatory when ranging beacons but energy drain)
@@ -143,6 +144,8 @@ function stopRangingBeaconsInRegion(
143144
}
144145

145146
module.exports = {
147+
BeaconsEventEmitter,
148+
146149
requestAlwaysAuthorization,
147150
requestWhenInUseAuthorization,
148151
getAuthorizationStatus,

0 commit comments

Comments
 (0)