diff --git a/README.md b/README.md index 637e724..15c01de 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@

EVVA React-Native Module

+

+ + NPM Version + + NPM Downloads + GitHub package.json dynamic + NPM Unpacked Size (with version) + GitHub last commit + GitHub branch check runs + EVVA License + +

+ The EVVA React-Native Module is a collection of tools to work with electronical EVVA access components. It allows for scanning and connecting via BLE. - [Features](#features) @@ -19,13 +32,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 ``` @@ -48,20 +62,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( + (data: ScanResult) => { + console.log(`Found device: ${data.name}`); + }, + (address: string) => { + console.log(`Connected to device: ${address}`); + }, + (address: string) => { + console.log(`Disconnected to device: ${address}`); + }, + 10_000 + ); } ``` @@ -72,17 +86,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, ); ```