Skip to content

Commit

Permalink
add scanning and import deviceEventEmitter
Browse files Browse the repository at this point in the history
  • Loading branch information
hadpro24 committed Sep 14, 2020
1 parent 5c3cd64 commit f513b66
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,20 @@
1. Open `android/app/src/main/AndroidManifest.xml`
- Add `<service android:name="com.jaalee.sdk.service.BeaconService" android:exported="false"/>` for scanning in your `<application android:name=".MainApplication"...`
- Assure you have:
`<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
```
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />`
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
```
## Featurs
- Scanning beacon JAALEE
- Call Beacon

## Usage
```javascript
import JaleeBeaconManager from 'react-native-android-jaalee';
import { DeviceEventEmitter } from 'react-native';

// Initialize Connection
JaleeBeaconManager.InitializerConnection();
Expand All @@ -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

```

Expand Down

0 comments on commit f513b66

Please sign in to comment.