Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update README.md #30

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ The EVVA React-Native Module is a collection of tools to work with electronical

## Installation
```
yarn add <git remote url>
yarn add @evva-sfw/abrevva-react-native
```

### IOS
### iOS

execute `pod install` inside of your projects ios/ folder.
Execute `bundle exec pod install` inside of your projects ios/ folder.

### Android

Perform a gradle sync.

## Examples

Expand All @@ -41,23 +45,21 @@ yarn add <git remote url>
To start off first import `AbrevvaBle` from this module

```typescript
import {AbrevvaBle} from '@evva-sfw/abrevva-react-native';
import { AbrevvaBle } from '@evva-sfw/abrevva-react-native';

async function scanForBleDevices(androidNeverForLocation: Boolean, timeout: Number){
const androidNeverForLocation = true;
async function scanForBleDevices(androidNeverForLocation: Boolean = true, timeout: Number) {
await AbrevvaBle.initialize(androidNeverForLocation);

const timeout = 10_000
AbrevvaBle.requestLEScan(
timeout,
10_000,
(data: ScanResult) => {
console.log(`found device: ${data.name}`);
console.log(`Found device: ${data.name}`);
},
(data: Object) => {
console.log(`Connected to device /w address=${data.address}`);
(address: string) => {
console.log(`Connected to device: ${address}`);
},
(data: Object) => {
console.log(`Disconnected to device /w address=${data.address}`);
(address: string) => {
console.log(`Disconnected to device: ${address}`);
}
);
}
Expand All @@ -68,17 +70,14 @@ async function scanForBleDevices(androidNeverForLocation: Boolean, timeout: Numb
With the signalize method you can localize EVVA components. On a successful signalization the component will emit a melody indicating its location.

```typescript
AbrevvaBle.signalize({ deviceId: 'deviceId' }() => {
console.log(`Signalized /w success=${it}`)
}
);
await AbrevvaBle.signalize({ deviceId: 'deviceId' });
```
### Perform disengage for EVVA components
### Perform disengage on EVVA components

For the component disengage you have to provide access credentials to the EVVA component. Those are generally acquired in the form of access media metadata from the Xesar software.

```typescript
AbrevvaBle.disengage({
const status = await AbrevvaBle.disengage({
deviceId: 'deviceId',
mobileId: 'mobileId',
mobileDeviceKey: 'mobileDeviceKey',
Expand Down
Loading