Commit Graph

114 Commits

Author SHA1 Message Date
Foti Dim 062f6c4c8c Add active filter count display and improve UI in ScannerScreen
- 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.
2026-02-10 21:55:02 +01:00
Foti Dim a7f04101a0 Remove manufacturer data display from PeripheralDetailPage and add company identifier service import 2026-02-09 22:43:46 +01:00
Foti Dim 8c75e3965f Integrate SharedPreferencesAsync for improved preferences handling
- 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.
2026-02-09 22:24:41 +01:00
Foti Dim 485c0808ad Refactor Bluetooth availability handling in ScannerScreen and AppDrawer
- 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.
2026-02-09 21:47:50 +01:00
Foti Dim b49d54b900 Add scan order functionality to ScannerScreen
- 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.
2026-02-09 21:37:44 +01:00
Foti Dim 061e0ae633 Make scan button persistent 2026-02-09 21:23:29 +01:00
Foti Dim 8ad6bbf125 Implement scan filter application logic in ScannerScreen
- 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.
2026-02-09 12:49:09 +01:00
Foti Dim d90a727991 Refactor ScannedItemWidget to StatefulWidget and enhance advertisement timestamp display
- 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.
2026-02-09 12:45:29 +01:00
Foti Dim fc6ae39a53 Display advertisements 2026-02-07 13:01:32 +01:00
Foti Dim 9df3da17ae Fix icons on Windows 2026-02-07 12:40:35 +01:00
Foti Dim 8d0739ccf5 Fix example app Windows compilation 2026-02-07 12:38:17 +01:00
Foti Dim bcf65e4573 Improve example app (#210)
* 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
2026-01-23 07:29:28 +01:00
Rohit Sangwan 2f7f1f693d Add Android scan mode setting (#212)
* Add Android scan mode setting

* Format pigeon generated code

* format whole project

* Fix windows compilation because of generated code order

* Fix unwanted imports

* Add doc comment for AndroidOptions

* Update code doc
2026-01-21 15:32:40 +05:30
Rohit Sangwan dae2f5dc4d Add service-data in advertisements (#207)
* Add service-data in advertisements

* Fix windows serviceData parsing

* Resolve Ai comments

* Resolve Ai comments and validate service data

* Cleanup and Update changelog
2026-01-21 13:43:36 +05:30
Foti Dim 1334057a8a Show and filter by company name (#208)
* 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.
2026-01-19 05:35:19 +01:00
Foti Dim bcfb0adc6a Improve format for discovered services (#209)
* 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
2026-01-19 05:34:50 +01:00
Foti Dim 2a65823e6c Update Bluetooth scanning UI and functionality
- 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.
2026-01-18 17:11:22 +01:00
Foti Dim 8557a46d05 Add auto-connect support (#206)
* 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>
2026-01-16 11:36:24 +05:30
Foti Dim a30e84a70c Add informational text and contact option in AppDrawer 2026-01-13 19:01:01 +01:00
Foti Dim 9d73a9f402 Add scan filter persistence using SharedPreferences
- 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.
2026-01-13 11:04:00 +01:00
Foti Dim 395bb548c9 Fix clear log button 2026-01-12 17:48:58 +01:00
EricKwok 1adfa9b485 Implement readRSSI on Android and Darwin (#203) 2026-01-05 17:49:55 +01:00
Foti Dim a5b6af6168 Enforce cxx_std_20 (#205)
* Enforce cxx_std_20

* Bump version

* Switch to private
2026-01-05 16:12:31 +01:00
Foti Dim 7a6e555275 Change button wording 2025-12-29 11:23:50 +01:00
Foti Dim 4b62d61f58 Update readme 2025-12-23 07:48:31 +01:00
Foti Dim 192ee469c3 Add tablet preview device 2025-12-21 10:58:54 +01:00
Foti Dim 9a52bd41a8 Update iOS podfile.lock 2025-12-21 10:43:56 +01:00
Foti Dim af598d13bb Update copyright date 2025-12-21 09:50:49 +01:00
Foti Dim dad326ccff Add device preview 2025-12-21 09:46:17 +01:00
Foti Dim f6eb5dd4e3 Add app readme 2025-12-21 08:56:54 +01:00
Rohit Sangwan 895dcbe343 Improve example app UI (#193)
* 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>
2025-12-21 08:51:36 +01:00
Rohit Sangwan 97936046e0 Implement hasPermissions API (#201)
* Implement hasPermissions api

* Bump minimum MacOS version to 10.15

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 22:10:21 +01:00
Rohit Sangwan 89abb3bf03 Implement Logging (#199)
* 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
2025-12-12 18:56:43 +05:30
Rohit Sangwan fa319416ef Implement timestamp in scanResult (#198)
* Implement timestamp in scanResult

* Update pigeon

* implement windows

* Update changelog

* Fix Swift formatting

* Remove android unused import

* Format pigeon generated file
2025-12-11 19:24:13 +05:30
Rohit Sangwan 3116962e8c Implement characteristic descriptor discovery (#196)
* 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>
2025-12-10 11:36:04 +05:30
Rohit Sangwan 09bb22750a Improve disconnect api (#192)
* 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
2025-11-14 20:20:22 +05:30
Rohit Sangwan 970db165dd Implement requestPermission API (#190)
* 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>
2025-11-13 17:22:17 +01:00
Rohit Sangwan 6e82ceed77 Add button to hide discovered devices in example app (#191)
* 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>
2025-11-13 16:24:11 +01:00
Rohit Sangwan 34b39597fd Implement isScanning api (#188)
* Implement isScanning api

* Improve IOS scanning api

* Update Readme and Changelog
2025-11-12 14:57:44 +01:00
Rohit Sangwan c3b97e414f Fix iOS example app asking permission on app launch (#187)
* Fix iOS example app asking permission on app launch

* Dispose controllers
2025-11-11 19:44:25 +01:00
Rohit Sangwan acfa3200ca Implement unified and type safe error messages (#186)
* Implement unified and type safe error messages

* Fix Apple error handling

* improve linux exception handling

* improve web exception handling

* fix window imports

* update pigeon generated files

* Fix compilaton issue

* Fix windows error parsing

* Fix windows compilation

* Improve error handling on dart side

* rename _wrapFuture to _executeWithErrorHandling

* Add pigeon generation script and format generated dart file

* Update changelog

* Update readme

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-11-11 19:34:29 +01:00
Foti Dim b52ca9ee84 Add pana job 2025-11-10 21:40:31 +01:00
Rohit Sangwan af873b3153 Implement exclusion filter (#175)
* Implement exclusion filter

* Fix web filters

* Apply Ai Suggestions

* Fix scanFilterTest

* Resolve Ai comments

* Update readme and changelog

* Update CHANGELOG.md

Co-authored-by: Foti Dim <foti@navideck.com>

* Update exclusion filter doc

* Fix wording

---------

Co-authored-by: Foti Dim <foti@navideck.com>
Co-authored-by: Foti Dim <fotios.dimanidis@a2zebra.de>
2025-09-01 10:31:56 +03:00
Foti Dim 49a9d1defb Bump example app dependencies 2025-08-20 09:06:44 +02:00
Rohit Sangwan 2170588045 Fix characteristic value listener and add tests (#168)
* Improve characteristic value listener

* Implement characteristic tests

* Bump version and update changelog
2025-07-08 08:13:45 +02:00
Rohit Sangwan d56851cbfb Wait for writeWithoutResponse completion (#166)
* 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>
2025-06-26 08:05:59 +02:00
Rohit Sangwan 0008231bdf Update android example gradle 2025-06-24 20:05:49 +05:30
Foti Dim 17e13a475d Fix Android compilation 2025-06-24 15:11:17 +02:00
Rohit Sangwan 0758f5e91d Add high level API (#160)
* 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>
2025-06-19 13:02:14 +02:00
Rohit Sangwan 72090571a3 Add WebBluetoothGloballyDisabled exception and fix availability state (#165)
* Add WebBluetoothGloballyDisabled exception and fix availability state

* Update changelog and version

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-06-13 00:30:13 +02:00