@capacitor-community/bluetooth-le
Advanced tools
Comparing version 1.0.0-4 to 1.0.0
@@ -5,2 +5,10 @@ # Changelog | ||
## [1.0.0](https://github.com/capacitor-community/bluetooth-le/compare/v1.0.0-4...v1.0.0) (2021-05-23) | ||
### Bug Fixes | ||
* **android:** explicitly set looper for handlers ([4ebe4fe](https://github.com/capacitor-community/bluetooth-le/commit/4ebe4fea1cdada6a2a5a9e8e308755285513007f)) | ||
* **android:** use AlertDialog from android.app instead off androidx.appcompat.app ([9c4bbeb](https://github.com/capacitor-community/bluetooth-le/commit/9c4bbeb941dc9f2815c4fa2cc3e23e9476a0c035)) | ||
## [1.0.0-4](https://github.com/capacitor-community/bluetooth-le/compare/v1.0.0-3...v1.0.0-4) (2021-04-10) | ||
@@ -7,0 +15,0 @@ |
{ | ||
"name": "@capacitor-community/bluetooth-le", | ||
"version": "1.0.0-4", | ||
"version": "1.0.0", | ||
"description": "Capacitor plugin for Bluetooth Low Energy ", | ||
@@ -39,23 +39,23 @@ "main": "dist/plugin.cjs.js", | ||
"devDependencies": { | ||
"@capacitor/android": "^3.0.0-rc.0", | ||
"@capacitor/core": "^3.0.0-rc.0", | ||
"@capacitor/android": "^3.0.0", | ||
"@capacitor/core": "^3.0.0", | ||
"@capacitor/docgen": "^0.0.16", | ||
"@capacitor/ios": "^3.0.0-rc.0", | ||
"@capacitor/ios": "^3.0.0", | ||
"@ionic/eslint-config": "^0.3.0", | ||
"@ionic/prettier-config": "^1.0.1", | ||
"@ionic/swiftlint-config": "^1.1.2", | ||
"@types/jest": "^26.0.22", | ||
"eslint": "^7.24.0", | ||
"@types/jest": "^26.0.23", | ||
"eslint": "^7.27.0", | ||
"jest": "^26.6.3", | ||
"prettier": "^2.2.1", | ||
"prettier-plugin-java": "^1.0.2", | ||
"prettier": "^2.3.0", | ||
"prettier-plugin-java": "^1.1.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.45.1", | ||
"standard-version": "^9.2.0", | ||
"rollup": "^2.49.0", | ||
"standard-version": "^9.3.0", | ||
"swiftlint": "^1.0.1", | ||
"ts-jest": "^26.5.4", | ||
"ts-jest": "^26.5.6", | ||
"typescript": "~4.2.4" | ||
}, | ||
"peerDependencies": { | ||
"@capacitor/core": "^3.0.0-rc.0" | ||
"@capacitor/core": "^3.0.0" | ||
}, | ||
@@ -62,0 +62,0 @@ "files": [ |
@@ -16,3 +16,3 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-2-orange?style=flat-square" /></a> | ||
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-3-orange?style=flat-square" /></a> | ||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
@@ -27,2 +27,9 @@ </p> | ||
## Versions | ||
| Plugin | Capacitor | Documentation | | ||
| ------ | --------- | --------------------------------------------------------------------------------- | | ||
| 1.x | 3.x | [README](https://github.com/capacitor-community/bluetooth-le/blob/main/README.md) | | ||
| 0.x | 2.x | [README](https://github.com/capacitor-community/bluetooth-le/blob/0.x/README.md) | | ||
## Introduction | ||
@@ -64,9 +71,4 @@ | ||
``` | ||
# for Capacitor v2 | ||
npm install @capacitor-community/bluetooth-le@latest | ||
npm install @capacitor-community/bluetooth-le | ||
npx cap sync | ||
# for Capacitor v3 | ||
npm install @capacitor-community/bluetooth-le@next | ||
npx cap sync | ||
``` | ||
@@ -103,31 +105,4 @@ | ||
On Android, register the plugin in your main activity (this is only required for Capacitor 2): | ||
On Android, no further steps are required to use the plugin (if you are using Capacitor 2, see [here](https://github.com/capacitor-community/bluetooth-le/blob/0.x/README.md#android)). | ||
`./android/app/src/main/java/<PATH>/MainActivity.java`: | ||
```diff | ||
+ import com.capacitorjs.community.plugins.bluetoothle.BluetoothLe; | ||
public class MainActivity extends BridgeActivity { | ||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
// Initializes the Bridge | ||
this.init( | ||
savedInstanceState, | ||
new ArrayList<Class<? extends Plugin>>() { | ||
{ | ||
// Additional plugins you've installed go here | ||
// Ex: add(TotallyAwesomePlugin.class); | ||
+ add(BluetoothLe.class); | ||
} | ||
} | ||
); | ||
} | ||
} | ||
``` | ||
## Configuration | ||
@@ -181,4 +156,3 @@ | ||
// DO NOT use this | ||
import { Plugins } from '@capacitor/core'; | ||
const { BluetoothLe } = Plugins; | ||
import { BluetoothLe } from '@capacitor-community/bluetooth-le'; | ||
``` | ||
@@ -649,2 +623,18 @@ | ||
## Troubleshooting | ||
#### Connection fails on Android | ||
On some Android devices `connect()` may fail when the device was connected before, even if the device is not actually connected. | ||
In that case you should first call `disconnect()`, e.g.: | ||
```typesceript | ||
const device = await BleClient.requestDevice({ | ||
// ... | ||
}); | ||
// ... | ||
await BleClient.disconnect(device.deviceId); | ||
await BleClient.connect(device.deviceId); | ||
``` | ||
## Contributors ✨ | ||
@@ -661,2 +651,3 @@ | ||
<td align="center"><a href="https://twitter.com/dennisameling"><img src="https://avatars.githubusercontent.com/u/17739158?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dennis Ameling</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=dennisameling" title="Code">💻</a></td> | ||
<td align="center"><a href="http://squio.nl"><img src="https://avatars.githubusercontent.com/u/169410?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Johannes la Poutre</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=squio" title="Documentation">📖</a></td> | ||
</tr> | ||
@@ -663,0 +654,0 @@ </table> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
355800
1
655