web_view_ble 0.0.3 web_view_ble: ^0.0.3 copied to clipboard
Add Bluetooth Low Energy Support in WebView Flutter for Android and iOS
WebView Ble #
Flutter library To add Bluetooth Low Energy Support in WebView Flutter
Getting Started #
Using flutter_inappwebview for WebView and flutter_reactive_ble for bluetooth
Import these Libraries in your pubspec.yaml
flutter_inappwebview: ^5.4.3+7
web_view_ble: 0.0.3
Add WebView in your Project , Check flutter_inappwebview docs for setting up WebView
And check flutter_reactive_ble docs for adding bluetooth related settings in your native projects
Usage #
in your onLoadStop
callback of flutter_inappwebview , add this method
void onLoadStop(InAppWebViewController controller,BuildContext context) async {
WebViewBle.init(controller: controller, context: context);
}
Checkout /example for more details
Features #
The web_view_ble lib supports the following bluetooth Api's:
- Request Device (Filters : ServiceId , name , namePrefix)
- Connect
- Disconnect
- Discover services
- Discover characteristics
- Read / write a characteristic
- Subscribe / unsubscribe to a characteristic
## Resources
Thanks to [WebBle](https://github.com/daphtdazz/WebBLE) for Ble javascript Polyfill
## Additional information
This is Just The Initial Version feel free to Contribute or Report any Bug!