Skip to content

Commit

Permalink
docs: format readme
Browse files Browse the repository at this point in the history
  • Loading branch information
axi92 committed Aug 27, 2024
1 parent e72bde1 commit 533d2e2
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ The EVVA React-Native Module is a collection of tools to work with electronical
## Requirements

- react-native < 0.74.3
- Java 17+ (Android)
- Java 17+ (Android)
- Android SDK (Android)
- Android 10+ (API level 29) (Android)
- Xcode 15.4 (iOS)
- iOS 15.0+ (iOS)

## Installation

```
yarn add @evva-sfw/abrevva-react-native
```
Expand All @@ -48,20 +49,20 @@ To start off first import `AbrevvaBle` from this module
import { AbrevvaBle } from '@evva-sfw/abrevva-react-native';

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

AbrevvaBle.requestLEScan(
10_000,
(data: ScanResult) => {
console.log(`Found device: ${data.name}`);
},
(address: string) => {
console.log(`Connected to device: ${address}`);
},
(address: string) => {
console.log(`Disconnected to device: ${address}`);
}
);
await AbrevvaBle.initialize(androidNeverForLocation);

AbrevvaBle.requestLEScan(
10_000,
(data: ScanResult) => {
console.log(`Found device: ${data.name}`);
},
(address: string) => {
console.log(`Connected to device: ${address}`);
},
(address: string) => {
console.log(`Disconnected to device: ${address}`);
}
);
}
```

Expand All @@ -72,17 +73,18 @@ With the signalize method you can localize EVVA components. On a successful sign
```typescript
const success = await AbrevvaBle.signalize('deviceId');
```

### 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
const status = await AbrevvaBle.disengage(
'deviceId',
'mobileId',
'mobileDeviceKey',
'mobileGroupId',
'mobileAccessData',
false,
'deviceId',
'mobileId',
'mobileDeviceKey',
'mobileGroupId',
'mobileAccessData',
false,
);
```

0 comments on commit 533d2e2

Please sign in to comment.