-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·37 lines (32 loc) · 912 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @providesModule BeaconBroadcast
* @flow
*/
'use strict';
import React from 'react';
import {
NativeModules,
} from 'react-native';
const NativeBeaconJalee = NativeModules.RNAndroidJaalee;
const JaleeBeaconManager = {
InitializerConnection: function(){
NativeBeaconJalee.InitializerConnection();
},
StartRangingBeacon: function(proximityUUID, major, minor): Promise<any> {
return new Promise((resolve, reject) => {
NativeBeaconJalee.StartBeaconConnection(proximityUUID, major, minor, resolve, reject);
});
},
connectBeaconService: function(position){
return new Promise((resolve, reject) => {
NativeBeaconJalee.connectBeaconService(resolve, reject);
});
},
callBeaconJalee: function() {
return NativeBeaconJalee.callBeaconJalee();
},
onStopRanging: function() {
NativeBeaconJalee.onStop();
},
};
export default JaleeBeaconManager;