From f513b660a0771fbb5a581b0cb32d5d085a971b35 Mon Sep 17 00:00:00 2001 From: Harouna Diallo Date: Mon, 14 Sep 2020 17:08:27 +0000 Subject: [PATCH] add scanning and import deviceEventEmitter --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 76ff6e3..bf041f6 100755 --- a/README.md +++ b/README.md @@ -31,10 +31,12 @@ 1. Open `android/app/src/main/AndroidManifest.xml` - Add `` for scanning in your ` + ``` + - ` + + ``` ## Featurs - Scanning beacon JAALEE - Call Beacon @@ -42,6 +44,7 @@ ## Usage ```javascript import JaleeBeaconManager from 'react-native-android-jaalee'; +import { DeviceEventEmitter } from 'react-native'; // Initialize Connection JaleeBeaconManager.InitializerConnection(); @@ -61,10 +64,17 @@ JaleeBeaconManager.InitializerConnection(); console.log('data ...', event); // Object // identifier, uid, major, minor, rssi, measuredPower, macAddress, battLevel + // connecting beacon service using default password + JaleeBeaconManager.connectBeaconService().then(() =>{ + console.log('beacon connected') + }).catch(error => { + console.log('error connection', error) + }); + }); // If beacon find run this to Call Beacon -JaleeBeaconManager.callBeaconJalee(); +JaleeBeaconManager.callBeaconJalee(); // this use the default password 666666 ```