Skip to content

Commit

Permalink
Fix onStateChange example and urls and upgrade min sdk version (#933)
Browse files Browse the repository at this point in the history
* Update onStateChange example

* fix urls

* Revert "fix urls"

This reverts commit 4a2bf39.

* Revert "Update onStateChange example"

This reverts commit 0f727e6.

* fix onStateChange example

* fix urls

* upgrade minSdkVersion
  • Loading branch information
mciechanowicz committed Dec 9, 2021
1 parent 478441e commit c8af4db
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Please provide detailed steps for reproducing the issue.

### Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Both JS and platform logs can be enabled via [setLogLevel](https://polidea.github.io/react-native-ble-plx/#blemanagersetloglevel) function call.
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Both JS and platform logs can be enabled via [setLogLevel](https://dotintent.github.io/react-native-ble-plx/#blemanagersetloglevel) function call.

* Library version: X.Y.Z
* Platform: Android/iOS.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/project_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please provide detailed steps for reproducing the issue.

### Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Both JS and platform logs can be enabled via [setLogLevel](https://polidea.github.io/react-native-ble-plx/#blemanagersetloglevel) function call.
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Both JS and platform logs can be enabled via [setLogLevel](https://dotintent.github.io/react-native-ble-plx/#blemanagersetloglevel) function call.

* Library version: X.Y.Z
* Platform: Android/iOS.
Expand Down
18 changes: 8 additions & 10 deletions INTRO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://github.com/Polidea/react-native-ble-plx"><img alt="react-native-ble-plx" src="logo.png" /></a>
<a href="https://github.com/dotintent/react-native-ble-plx"><img alt="react-native-ble-plx" src="logo.png" /></a>
</p>

This guide is an introduction to BLE stack and APIs exported by this library. All examples
Expand Down Expand Up @@ -32,15 +32,13 @@ To detect current state and following state changes we can use `onStateChange()`

```js
React.useEffect(() => {
manager.onStateChange((state) => {
const subscription = manager.onStateChange((state) => {
if (state === 'PoweredOn') {
this.scanAndConnect();
subscription.remove();
}
}, true);
return () => subscription.remove();
});
const subscription = manager.onStateChange((state) => {
if (state === 'PoweredOn') {
this.scanAndConnect();
subscription.remove();
}
}, true);
return () => subscription.remove();
}, [manager]);
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Contact us at [Gitter](https://gitter.im/RxBLELibraries/react-native-ble) if you
buildscript {
ext {
...
minSdkVersion = 18
minSdkVersion = 21
...
```
1. In `build.gradle` make sure to add jitpack repository to known repositories:
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
## 2. Publishing

1. You can test pre-release changes in your chosen application by installing the library as
```"react-native-ble-plx": "Polidea/react-native-ble-plx"```.
```"react-native-ble-plx": "dotintent/react-native-ble-plx"```.
2. Clean repository and publish new version: `git clean -xfd && npm publish`.
3. Add tag to the repository in form of `x.x.x`.
4. Add release notes to the [Github](https://github.com/Polidea/react-native-ble-plx/releases) by copying a list of changes from `CHANGELOG.md`.
4. Add release notes to the [Github](https://github.com/dotintent/react-native-ble-plx/releases) by copying a list of changes from `CHANGELOG.md`.
3. Check any issues which are fixed by a new version, close them and point to a new release in the comment section.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3')

defaultConfig {
minSdkVersion 18
minSdkVersion 21
targetSdkVersion safeExtGet('targetSdkVersion', 27)
}
lintOptions {
Expand Down
24 changes: 12 additions & 12 deletions docs/README_V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ This is React Native Bluetooth Low Energy library using [RxBluetoothKit](https:/

It supports:

- [observing device's Bluetooth adapter state](https://github.com/Polidea/react-native-ble-plx/wiki/Bluetooth-Adapter-State)
- [scanning BLE devices](https://github.com/Polidea/react-native-ble-plx/wiki/Bluetooth-Scanning)
- [making connections to peripherals](https://github.com/Polidea/react-native-ble-plx/wiki/Device-Connecting)
- [discovering services/characteristics](https://github.com/Polidea/react-native-ble-plx/wiki/Device-Service-Discovery)
- [reading](https://github.com/Polidea/react-native-ble-plx/wiki/Characteristic-Reading)/[writing](https://github.com/Polidea/react-native-ble-plx/wiki/Characteristic-Writing) characteristics
- [observing characteristic notifications/indications](https://github.com/Polidea/react-native-ble-plx/wiki/Characteristic-Notifying)
- [reading RSSI](https://github.com/Polidea/react-native-ble-plx/wiki/RSSI-Reading)
- [negotiating MTU](https://github.com/Polidea/react-native-ble-plx/wiki/MTU-Negotiation)
- [background mode on iOS](https://github.com/Polidea/react-native-ble-plx/wiki/Background-mode-(iOS))
- [observing device's Bluetooth adapter state](https://github.com/dotintent/react-native-ble-plx/wiki/Bluetooth-Adapter-State)
- [scanning BLE devices](https://github.com/dotintent/react-native-ble-plx/wiki/Bluetooth-Scanning)
- [making connections to peripherals](https://github.com/dotintent/react-native-ble-plx/wiki/Device-Connecting)
- [discovering services/characteristics](https://github.com/dotintent/react-native-ble-plx/wiki/Device-Service-Discovery)
- [reading](https://github.com/dotintent/react-native-ble-plx/wiki/Characteristic-Reading)/[writing](https://github.com/dotintent/react-native-ble-plx/wiki/Characteristic-Writing) characteristics
- [observing characteristic notifications/indications](https://github.com/dotintent/react-native-ble-plx/wiki/Characteristic-Notifying)
- [reading RSSI](https://github.com/dotintent/react-native-ble-plx/wiki/RSSI-Reading)
- [negotiating MTU](https://github.com/dotintent/react-native-ble-plx/wiki/MTU-Negotiation)
- [background mode on iOS](https://github.com/dotintent/react-native-ble-plx/wiki/Background-mode-(iOS))
- turning the device's Bluetooth adapter on

What this library does NOT support:

- communicating between phones using BLE (Peripheral support)
- [bonding peripherals](https://github.com/Polidea/react-native-ble-plx/wiki/Device-Bonding)
- [bonding peripherals](https://github.com/dotintent/react-native-ble-plx/wiki/Device-Bonding)

## Compatibility

Expand Down Expand Up @@ -120,7 +120,7 @@ Contact us at [Gitter](https://gitter.im/RxBLELibraries/react-native-ble) if you
android {
...
defaultConfig {
minSdkVersion 18
minSdkVersion 21
...
```
4. In `build.gradle` of `app` module make sure to add jitpack repository to known repositories:
Expand Down Expand Up @@ -148,7 +148,7 @@ allprojects {
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

<uses-sdk
android:minSdkVersion="18"
android:minSdkVersion="21"
...
```

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ <h2 id='introduction' class='mt0'>


<p align="center">
<a href="https://github.com/Polidea/react-native-ble-plx"><img alt="react-native-ble-plx" src="logo.png" /></a>
<a href="https://github.com/dotintent/react-native-ble-plx"><img alt="react-native-ble-plx" src="logo.png" /></a>
</p>
<p>This guide is an introduction to BLE stack and APIs exported by this library. All examples
will be based on CC2541 SensorTag.</p>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/Polidea/react-native-ble-plx.git"
"url": "git+https://github.com/dotintent/react-native-ble-plx.git"
},
"devDependencies": {
"@babel/core": "^7.12.3",
Expand Down Expand Up @@ -51,7 +51,7 @@
"author": "Polidea",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/Polidea/react-native-ble-plx/issues"
"url": "https://github.com/dotintent/react-native-ble-plx/issues"
},
"homepage": "https://github.com/Polidea/react-native-ble-plx#readme"
}
"homepage": "https://github.com/dotintent/react-native-ble-plx#readme"
}

0 comments on commit c8af4db

Please sign in to comment.