- Introduced a new method `_getActiveFilterCount` to calculate the number of active filters.
- Updated the filter button to show a badge with the active filter count.
- Changed the clear filter button icon for better clarity.
- Enhanced the hint style in the scan filter widget for improved visibility.
- Added a new `prefs_async.dart` file to encapsulate the usage of `SharedPreferencesAsync`.
- Updated `ScanController`, `StorageService`, and `ScannerScreen` to utilize the new async preferences methods, enhancing performance and code clarity.
- Modified `devtools_options.yaml` to enable the `shared_preferences` extension.
- Refactored the `FlashOnUpdateWidget` to improve the outline animation and added a customizable border radius.
- Adjusted the favorite services loading mechanism in `PeripheralDetailPage` to be asynchronous, ensuring better state management.
- Removed the tooltip for Bluetooth availability from ScannerScreen and integrated the BleAvailabilityIcon directly into the AppDrawer.
- Updated the AppDrawer to accept Bluetooth availability state and a callback for state changes.
- Simplified button labels in ScannerScreen and ScannedDevicesPlaceholderWidget for clarity.
- Adjusted padding for buttons to enhance UI consistency.
- Introduced an enum `ScanOrder` to define sorting options for scanned devices.
- Implemented logic to save and retrieve the selected scan order from shared preferences.
- Added a popup menu for users to select the sorting method (Last Seen, Name, RSSI).
- Updated the device list display to reflect the selected sorting order, enhancing user experience.
- Added a new method `_onScanFilterApplied` to handle the application of scan filters, which updates the state and clears device lists.
- Refactored the filter application logic in the bottom sheet to utilize the new method for better code organization.
- Ensured that device lists are cleared when a new filter is applied and scanning is stopped if currently active.
- Converted ScannedItemWidget from StatelessWidget to StatefulWidget to manage state and update the UI dynamically.
- Added a timer to refresh the display of the last advertisement timestamp.
- Improved the formatting of the last seen advertisement message for better clarity.
* Improve example app
- Introduced utility functions for sorting BLE services and filtering characteristics based on properties.
- Updated the peripheral detail page to support reading all characteristics and improved value formatting for better readability.
- Added navigation functionality for adjacent characteristics and integrated property filters in the services list widget.
- Enhanced the services side widget to manage selected properties and provide a clearer UI for service interactions.
- Implemented copy functionality for logs and improved overall user experience in the peripheral details section.
* Remove expandable
* Automatically start scanning on launch
* Show loading indicator for discovering services
* Decrease the height of TextFormField
* Add service-data in advertisements
* Fix windows serviceData parsing
* Resolve Ai comments
* Resolve Ai comments and validate service data
* Cleanup and Update changelog
* Update company identifier handling and enhance scanning features
- Updated `pubspec.lock` to version 1.2.0 and added `yaml` dependency.
- Introduced `CompanyIdentifierService` for loading and querying company identifiers from a new YAML file.
- Enhanced scanning functionality to support filtering by company names and IDs.
- Updated UI components to display company names alongside manufacturer data in scanned items.
- Improved search functionality to include company names in the filter criteria.
* Address AI comments
* Address AI comments
* Allow searching by company id
* Remove redundant loading state update in CompanyIdentifierService
* Enhance company ID parsing in CompanyIdentifierService
- Updated the `_parseCompanyId` method to support additional formats for company IDs, including non-prefixed strings interpreted as decimal or hexadecimal based on their content.
- Improved parsing logic to first attempt hexadecimal conversion if the string contains hex characters, enhancing flexibility in input handling.
* Update the peripheral detail page to format and display discovered services more clearly, including characteristics.
* Address AI comments
* Refactor characteristic display format in peripheral detail page for improved clarity
- Bump version to 1.2.0 in pubspec.lock.
- Enhance ScannerScreen with a Bluetooth availability tooltip and improved search filter UI.
- Refactor AppDrawer to include a queue type selection feature.
- Update ScannedDevicesPlaceholderWidget to include a 'Start Scan' button for better user interaction.
- Improve overall layout and styling for better user experience.
* Add autoConnect support
* Enhance autoConnect functionality for Bluetooth devices
- Added support for managing a set of auto-connect devices in both Android and iOS implementations.
- Updated connection and disconnection logic to handle auto-reconnect scenarios appropriately.
- Improved cleanup processes to prevent unwanted reconnections when devices are manually disconnected.
* Refactor connection button and add auto-reconnect toggle
- Updated the connection button layout for better UI consistency.
- Introduced an auto-reconnect toggle to manage automatic reconnections when devices become available.
- Enhanced connection and disconnection logic to respect the auto-connect setting.
* Update version to 1.2.0 and add CHANGELOG for new features
- Bumped version to 1.2.0.
- Added CHANGELOG.md detailing new features including support for `autoConnect` and UI updates for automatic reconnection.
* Improve readme
* Refactor variable naming for clarity in Bluetooth connection logic
- Changed variable name from `isAutoConnect` to `shouldAutoConnect` for better readability and understanding of its purpose in the connection state handling.
* Refactor connection handling in UniversalBlePlugin
- Simplified connection logic by always cleaning up internal state before sending connection change callbacks.
- Ensured GATT resources are only closed when autoConnect is disabled, allowing for better management of Bluetooth connections.
* Refactor disconnection handling in UniversalBlePlugin
- Introduced a new method `handlePeripheralDisconnection` to encapsulate disconnection logic, improving code readability and maintainability.
- Updated the `centralManager` methods to utilize the new disconnection handler, ensuring consistent behavior across connection state changes.
* Update darwin/Classes/UniversalBlePlugin.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Foti Dim <fotios.dimanidis@a2zebra.de>
Co-authored-by: Navideck Labs <130186950+navidecklabs@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Implemented loading and saving of scan filters (services, name prefix, manufacturer data, and search term) using SharedPreferences.
- Added functionality to apply filters from the loaded preferences.
- Updated the UI to save filters when they change or when the search is cleared.
* Improve example app ui
* Store favorite services in local storage
* Use Text instead of SelectableText
* Improve colors
* Fix flutter analyzer issues
* Revert example app minimum sdk requirement
* Implement hasPermission api and improve ui flow
* More ui improvements
* Improve ScannedItem ui
* Improve control ui
* Change color theme to blue
* Minor improvements wip
* improve responsive ui and flow
* More improvements
* More improvements
* Update Mac podfile
* Fix home page scroll view
* Update app and package name
* Revert changelog
* Resolve Ai comments
---------
Co-authored-by: Foti Dim <foti@navideck.com>
* Implement Logging
* Add timestamp in OnValueChanged
* improve web and linux logging
* Implement windows and format pigeon
* Fix windows build and unity log level
* Log commands with timestamp
* Fix code doc
* Remove unnecessary import
* Update docs
* Fix crash on windows 11 because of failed pairing
* Update changelog
* Fix native code formatting
* Implement characteristic descriptor discovery
* Improve Darwin services discovery
* Minor mac fix
* Implement Windows support
* discover descriptors in DiscoverServicesAsync api on windows
* Add withDescriptors in discoverServices api
* Implement withDescriptors for Apple and Android
* Fix ai comment and format pigeon generated file
* Resolve Ai comment
* Capitalize API
* Handle empty services scenario
---------
Co-authored-by: Foti Dim <foti@navideck.com>
* Improve disconnect api
* Get disconnection event on Web from callback
* Wait for disconnection result on calling disconnect
* Improve linux disconnection
* Update Changelog
* Fix Ai comments
* Implement requestPermission api
* Update example ios podfile
* Update example windows dependencies
* Update Readme and Changelog
* Resolve Ai Comments
* Improve bluetooth permission handling
* Update Readme
* Improve readme
---------
Co-authored-by: Foti Dim <foti@navideck.com>
* Add button to hide discovered devices in example app
* Resolve Ai Comments
* Apply suggestion from @fotiDim
* Add tooltip
---------
Co-authored-by: Foti Dim <foti@navideck.com>
* Wait for writeWithoutResponse request completion on Android
* Wait for writeWithoutResponse request completion on Darwin
* Add WriteWithoutResponse button in example app
* Update changelog and bump version
* Apply suggestions from code review
Co-authored-by: Foti Dim <foti@navideck.com>
---------
Co-authored-by: Foti Dim <foti@navideck.com>
* Add high-level api extensions for BleDevice and Characteristic
* Add doc comments and move few files to utils
* Add advance documentation
* Make the high level APIs the new default in the readme
* More readme cleanups
* Add pair api, improve notifications apis and deprecate writeValue
* Use highLevel apis in Example
* Rename HighLevel isPaired api to hasPairing api
* Update Readme
* Rename low level readValue api to read and update Readme
* Update UniversalBle to use new apis instead of deprecated internally
* Split queueCommand and queueCommandWithoutTimeout
* Split setNotifiable into subscribeNotifications, subscribeIndications and unsubscribe
* Fix web imports
* Update changelog
* Switch back to isPaired
Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>
* Fix BleDevice toString method
* Switch back to isPaired
* Change peripheral to device
* Rename cached to preferCached
* Remove preferCached from discoverServices()
* Update changelog
* Use cached services
* Add ///
* Reverse withoutResponse to withResponse to avoid negation
* Link to low level API
* Move connectionState to public readme
* Rename disableSubscriptions to unsubscribe
* Improve documentation
* Fix getService cache
* Add NotFoundException
---------
Co-authored-by: Foti Dim <foti@navideck.com>
* Add WebBluetoothGloballyDisabled exception and fix availability state
* Update changelog and version
---------
Co-authored-by: Foti Dim <foti@navideck.com>