react-native-ble-manager 12.1.3 → 12.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ The library is a simple connection with the OS APIs, the BLE stack should be sta
|
|
|
17
17
|
|
|
18
18
|
RN 0.76+ only the new architecture is supported
|
|
19
19
|
|
|
20
|
-
RN 0.60-0.75 supported until 11.
|
|
20
|
+
RN 0.60-0.75 supported until 11.X
|
|
21
21
|
RN 0.40-0.59 supported until 6.7.X
|
|
22
22
|
RN 0.30-0.39 supported until 2.4.3
|
|
23
23
|
|
|
@@ -72,6 +72,16 @@ npm run build
|
|
|
72
72
|
|
|
73
73
|
> if you are modifying the typescript files of the library (in `src/`) on the fly, you can run `npm run watch` instead. If you are modifying files from the native counterparts, you'll need to rebuild the whole app for your target environnement (`npm run android/ios`).
|
|
74
74
|
|
|
75
|
+
### Updating documentation
|
|
76
|
+
|
|
77
|
+
Edit files in `docs/`, then test locally with:
|
|
78
|
+
```shell
|
|
79
|
+
cd docs
|
|
80
|
+
bundle install
|
|
81
|
+
bundle exec jekyll serve --watch --baseurl /
|
|
82
|
+
```
|
|
83
|
+
Then open http://localhost:4000/
|
|
84
|
+
|
|
75
85
|
## Generate the native code from specs
|
|
76
86
|
A react-native project is needed to generate the code via *codegen*.
|
|
77
87
|
|
package/android/build.gradle
CHANGED
|
@@ -69,7 +69,7 @@ android {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
defaultConfig {
|
|
72
|
-
minSdkVersion safeExtGet("minSdkVersion",
|
|
72
|
+
minSdkVersion safeExtGet("minSdkVersion", 24)
|
|
73
73
|
targetSdk safeExtGet("targetSdk", 34)
|
|
74
74
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
75
75
|
}
|
|
@@ -129,4 +129,4 @@ if (isNewArchitectureEnabled()) {
|
|
|
129
129
|
libraryName = "BleManager"
|
|
130
130
|
codegenJavaPackageName = "it.innove"
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
}
|
|
@@ -972,6 +972,11 @@ class BleManager extends NativeBleManagerSpec {
|
|
|
972
972
|
|
|
973
973
|
@Override
|
|
974
974
|
public void invalidate() {
|
|
975
|
+
try {
|
|
976
|
+
context.unregisterReceiver(mReceiver);
|
|
977
|
+
} catch (Exception e) {
|
|
978
|
+
Log.e(LOG_TAG, "Receiver not registered or already unregistered", e);
|
|
979
|
+
}
|
|
975
980
|
try {
|
|
976
981
|
// Disconnect all known peripherals, otherwise android system will think we are still connected
|
|
977
982
|
// while we have lost the gatt instance
|