web_view_ble 0.0.2 web_view_ble: ^0.0.2 copied to clipboard
Add Bluetooth Low Energy Support in WebView Flutter
web_view_ble #
web_view_ble To add Bluetooth Low Energy Support in WebView Flutter
Getting Started #
Currently 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.2
add WebView in your Project , Check flutter_inappwebview docs for setting WebView and check flutter_reactive_ble docs for adding bluetooth related settings in your native folders
then inside onLoadStop
callback of WebView , call this library like this
void onLoadStop(InAppWebViewController controller,BuildContext context) async {
WebViewBle.init(controller: controller, context: context);
}
and that's it ,WebBluetooth support will be added to your webview , Checkout Example for more details
Currently project is in Early stage ,many features are pending to implement yet and Apis might change later
Supported Api's : #
Request Device
- FiltersAvailable : ServiceId , name , namePrefix
Connect
Disconnect
Read Characteristics
Write Characteristics
GetCharacteristics List
Subscribeto Characteristics
Unsubscribe Characteristics
Get Connecton Status update
## 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!