web_view_ble 0.0.1 web_view_ble: ^0.0.1 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 quick_blue for bluetooth
Import these Libraries in your pubspec.yaml
flutter_inappwebview: ^5.4.3+7
web_view_ble: 0.0.1
add WebView in your Project , Check flutter_inappwebview docs for setting WebView and check quick_blue 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(controller: controller, context: context).init();
}
and that's it ,WebBluetooth support will be added to your webview Checkout Example for more details
Currently projet is in Early stage ,many features are pending to implement yet and Apis might change later
Supported Api's : #
Request Device
Connect
Disconnect
Read Characteristics
Write Characteristics
TODO : #
getCharacteristics
Subscribe/Unsubscribe to Characteristics
Get Device Connection State Event
Resources #
Thanks to WebBle for Ble javascript Polyfill
Additional information #
This is Just The Initial Version feel free to Contribute or Report any Bug!