Skip to content

Commit

Permalink
Merge branch 'main' into chore/minor-ui-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7061 authored Aug 16, 2024
2 parents d58ecbc + 03f4ec6 commit f13febe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 58 deletions.
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,
});
```
6 changes: 3 additions & 3 deletions example/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@ GEM
netrc (0.11.0)
nkf (0.2.0)
public_suffix (4.0.7)
rexml (3.2.9)
rexml (3.3.3)
strscan
ruby-macho (2.5.1)
strscan (3.1.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.24.0)
xcodeproj (1.25.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.2, < 4.0)

PLATFORMS
aarch64-linux-gnu
Expand Down

0 comments on commit f13febe

Please sign in to comment.