Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/bundler/example/rexml-3.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
axi92 authored Feb 4, 2025
2 parents 6b9e0f2 + 2ce084d commit 35844f0
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 101 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

51 changes: 21 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,39 @@


## [2.0.0](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.1...2.0.0) (2024-10-22)
## [2.0.2](https://github.com/evva-sfw/abrevva-react-native/compare/2.0.1...2.0.2) (2024-12-06)


### ⚠ BREAKING CHANGES
### 🐛 Bug Fixes

* rename package name
* android manifest permssions for BLE; fix DisengageStatus return value ([eb2d8b7](https://github.com/evva-sfw/abrevva-react-native/commit/eb2d8b7d0ccaac8caebe2b82a27feb8c3bc77212))

### chore

* rename package name ([5cb649d](https://github.com/evva-sfw/abrevva-react-native/commit/5cb649d521859fbfec62ec006cb8b99da4d47a53))


### Features

* replaced manual disengage logic with AbrevvaSDK disengage function ([#46](https://github.com/evva-sfw/abrevva-react-native/issues/46)) ([b16cf3b](https://github.com/evva-sfw/abrevva-react-native/commit/b16cf3baa897c098d8cf6b431e7c03aa91054395))


### Bug Fixes

* removed cryptoswift from podfile and formating ([0b6d2c5](https://github.com/evva-sfw/abrevva-react-native/commit/0b6d2c512ec5411b5f2c3cc39eb76844c8849a39))
* removed nfc ([9384a65](https://github.com/evva-sfw/abrevva-react-native/commit/9384a65b4f6d0532964c2690c73cfdbd2dd985d4))
* removed nfc traces ([bbb4042](https://github.com/evva-sfw/abrevva-react-native/commit/bbb404217a60bf514bbdb7c21072bd110f23c41d))
* removed whitespace in string, since toInt throws otherwise ([82e3d6d](https://github.com/evva-sfw/abrevva-react-native/commit/82e3d6d21dd8351610762d382e5ba420e9f34327))
### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

### Documentation
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

* change deprecation alert to important ([1ee4c06](https://github.com/evva-sfw/abrevva-react-native/commit/1ee4c06ebb01a546e77c1cc027fff147b4b414c6))
#### [2.0.2](https://github.com/evva-sfw/abrevva-react-native/compare/2.0.1...2.0.2)

- fix: android manifest permssions for BLE; fix DisengageStatus return [`#79`](https://github.com/evva-sfw/abrevva-react-native/pull/79)

### Continuous Integration
#### [2.0.1](https://github.com/evva-sfw/abrevva-react-native/compare/2.0.0...2.0.1)

* fix test-android gradle target ([cb28d88](https://github.com/evva-sfw/abrevva-react-native/commit/cb28d883cdf3b882e4e8c0b065ec9f9527afc9bf))
* fix version in filename for release ([#45](https://github.com/evva-sfw/abrevva-react-native/issues/45)) ([9e6dbaf](https://github.com/evva-sfw/abrevva-react-native/commit/9e6dbafee8f7f7b748104354213f1d050ddcd6a7))
* reconfigure auto-changelog to only track merge commits ([#52](https://github.com/evva-sfw/abrevva-react-native/issues/52)) ([089cd1a](https://github.com/evva-sfw/abrevva-react-native/commit/089cd1a9d25300fd831157997271bcf585e18c3a))
> 5 December 2024
### Changelog
- fix: resolve disengage and scanning issues; add missing manifest perm… [`#77`](https://github.com/evva-sfw/abrevva-react-native/pull/77)
- ci: remove dependabot config [`#75`](https://github.com/evva-sfw/abrevva-react-native/pull/75)
- chore(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.31.0 [`#71`](https://github.com/evva-sfw/abrevva-react-native/pull/71)
- chore(deps-dev): bump @evilmartians/lefthook from 1.7.14 to 1.8.2 [`#72`](https://github.com/evva-sfw/abrevva-react-native/pull/72)
- chore(deps-dev): bump react-native-builder-bob from 0.30.0 to 0.30.3 [`#73`](https://github.com/evva-sfw/abrevva-react-native/pull/73)
- chore(deps-dev): bump @babel/runtime from 7.25.4 to 7.26.0 [`#68`](https://github.com/evva-sfw/abrevva-react-native/pull/68)
- chore(deps): bump react-native-safe-area-context from 4.10.9 to 4.12.0 [`#67`](https://github.com/evva-sfw/abrevva-react-native/pull/67)
- ci: add icons to release notes [`#65`](https://github.com/evva-sfw/abrevva-react-native/pull/65)
- chore(deps): bump @scure/base from 1.1.7 to 1.1.9 [`#55`](https://github.com/evva-sfw/abrevva-react-native/pull/55)

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
### [2.0.0](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.1...2.0.0)

#### [2.0.0](https://github.com/evva-sfw/abrevva-react-native/compare/1.0.1...2.0.0)
> 22 October 2024
- chore!: rename package to @evva/ instead of @evva-sfw/ [`#60`](https://github.com/evva-sfw/abrevva-react-native/pull/60)
- fix!: removed broken nfc code [`#61`](https://github.com/evva-sfw/abrevva-react-native/pull/61)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.annotation.RequiresPermission
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import com.evva.xesar.abrevva.ble.BleManager
import com.evva.xesar.abrevva.disengage.DisengageStatusType
import com.evva.xesar.abrevva.util.bytesToString
import com.evva.xesar.abrevva.util.stringToBytes
import com.facebook.react.bridge.Arguments
Expand Down Expand Up @@ -181,6 +182,7 @@ class AbrevvaBleModule(reactContext: ReactApplicationContext) :
@ReactMethod
fun stopLEScan(promise: Promise) {
manager.stopScan()
promise.resolve("success")
}

@ReactMethod
Expand Down Expand Up @@ -314,9 +316,9 @@ class AbrevvaBleModule(reactContext: ReactApplicationContext) :
mobileGroupId,
mobileAccessData,
isPermanentRelease
) { status: Any ->
) { status: DisengageStatusType ->
val result = Arguments.createMap()
result.putString("value", status as String)
result.putString("value", status.toString())

promise.resolve(result)
}
Expand Down
25 changes: 23 additions & 2 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:maxSdkVersion="30"
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:maxSdkVersion="30"
android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
android:maxSdkVersion="30"
android:name="android.permission.BLUETOOTH" />
<uses-permission
android:maxSdkVersion="30"
android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission
android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation"
tools:targetApi="s" />

<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="true" />

<application
android:name=".MainApplication"
Expand Down
41 changes: 21 additions & 20 deletions example/src/BleScreenComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ScanResults = ({ props }) => {
});
};

const onRefresh = () => {
const onRefresh = async () => {
setStatus('none');
setScanNoftification('scanning ...');
setRefreshing(true);
Expand All @@ -54,23 +54,24 @@ const ScanResults = ({ props }) => {
setRefreshing(false);
setScanNoftification('');
}, 3_000);
AbrevvaBle.stopLEScan()
.then(() => {
void AbrevvaBle.requestLEScan(
scanRequestCallback,
(address: string) => {
console.log(`connected to Device =${address}`);
},
(address: string) => {
console.log(`disconnected from Device =${address}`);
},
10_000,
);
})
.catch((e) => {
console.log(e);
clearTimeout(timeout);
});

await AbrevvaBle.stopLEScan();

try {
await AbrevvaBle.requestLEScan(
scanRequestCallback,
(address: string) => {
console.log(`connected to Device =${address}`);
},
(address: string) => {
console.log(`disconnected from Device =${address}`);
},
10_000,
);
} catch (err) {
console.log(err);
clearTimeout(timeout);
}
};

useEffect(() => {
Expand All @@ -86,15 +87,15 @@ const ScanResults = ({ props }) => {
<SafeAreaView style={bleStyles.BleScanResult}>
<TouchableOpacity
onPress={async () => {
AbrevvaBle.connect(item.item.device.deviceId, 10_000);
AbrevvaBle.disengage(
const result = await AbrevvaBle.disengage(
'deviceId',
'mobileId',
'deviceKey',
'mobilegroudId',
'mobileAccessData',
true,
);
console.log(`Disengage Status: ${result.value}`);
}}
>
<Text>{item.item.device.deviceId}</Text>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evva/abrevva-react-native",
"version": "2.0.0",
"version": "2.0.2",
"author": "EVVA Sicherheitstechnologie GmbH",
"description": "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.",
"source": "./src/index.tsx",
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class AbrevvaBleModule implements AbrevvaBLEInterface {
}

async stopLEScan(): Promise<void> {
return await NativeModuleBle.stopLEScan();
return NativeModuleBle.stopLEScan();
}

async connect(deviceId: string, timeout?: number): Promise<void> {
Expand Down
Loading

0 comments on commit 35844f0

Please sign in to comment.