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 #21

Merged
merged 3 commits into from
Aug 13, 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
73 changes: 18 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,21 @@ The EVVA React-Native Module is a collection of tools to work with electronical

## Requirements

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

## Installation
```
yarn add <git remote url>
```

### Setup Github auth to load package

Create a copy of [local.properties.template](example/android/local.properties.template) and rename it to local.properties in the same directory. Paste your github username and [classic PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)

### IOS

Add the following to your Podfile:

```ruby
source 'https://github.com/evva-sfw/abrevva-sdk-ios-pod-specs.git'
source 'https://cdn.cocoapods.org/'
```

then execute `pod install` inside of your projects ios/ folder.

### Android

Add this to your `build.gradle` file:

```ruby
repositories {
maven {
url = uri("https://maven.pkg.github.com/evva-sfw/abrevva-sdk-android")
}
}
...
dependencies {
implementation group: "com.evva.xesar", name: "abrevva-sdk-android", version: "1.0.19" <-- change to latest version.
}
```

Add Permissions to your `Manifest.xml` file as needed.

```ruby
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
```
execute `pod install` inside of your projects ios/ folder.

## Examples

Expand All @@ -76,7 +41,7 @@ Add Permissions to your `Manifest.xml` file as needed.
To start off first import `AbrevvaBle` from this module

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

async function scanForBleDevices(androidNeverForLocation: Boolean, timeout: Number){
const androidNeverForLocation = true;
Expand All @@ -103,24 +68,22 @@ 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,
() => {
AbrevvaBle.signalize({ deviceId: 'deviceId' }() => {
console.log(`Signalized /w success=${it}`)
}
}
);
```
### Perform disengage for 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(
mobileId: '',
mobileDeviceKey:: '',
mobileGroupId: '',
mobileAccessData: '',
isPermanentRelease: '',
timeout: 10_000
);
AbrevvaBle.disengage({
deviceId: 'deviceId',
mobileId: 'mobileId',
mobileDeviceKey: 'mobileDeviceKey',
mobileGroupId: 'mobileGroupId',
mobileAccessData: 'mobileAccessData',
isPermanentRelease: false,
});
```
Loading