Skip to content

Releases: iDevicesInc/SweetBlue

2.52.17 Release

15 Jun 18:00
Compare
Choose a tag to compare

This is mainly a bug fix release.

  • Fixed IndexOutOfBoundsExceptions in the device manager class
  • SweetBlue will now parse multiple manufacturer data blocks in the scan response data
  • Added new failure case for when scanning has reached its max limit
  • Make the PollManager class' list thread safe
  • Deprecated BleScanInfo, and created BleScanRecord as it's replacement
  • Fixed another IndexOutOfBoundsException in the task queue class

2.52.16 Release

06 Apr 19:22
6031339
Compare
Choose a tag to compare
  • Changed name of setMtu method to negotiateMtu as it more represents what's happening (android device negotiates with the peripheral to find it's best MTU). setMtu has been deprecated
  • Fixed an issue on phones running Android 8.1 or higher where if the screen is off, no scan results are returned.
  • Fixed a couple of rare NPEs
  • Fixed an issue where sometimes a scan wouldn't actually stop when the task is interrupted.

2.52.15 Release

22 Jan 19:02
Compare
Choose a tag to compare
  • Fixed some callbacks which weren't posting to the expected thread
  • Deprecated NativeStateListener (will be removed in v3)
  • Fixed issue where advertising flags weren't updating on subsequent scans
  • Fixed NPE that could happen due to a race condition
  • Rssi polling will now return results when the device is disconnected (however, a scan must be running, and the device must be found in the scan).

2.52.14 Release

07 Dec 22:13
Compare
Choose a tag to compare
  • Fixed issues with BleServer advertising (was perpetually advertising, and stopAdvertising() didnt actually stop it)
  • Fixed an issue with the logger that would end up showing the wrong thread names, when logging is enabled
  • Cache instances of SharedPreferences for options managed on disk (rather than constantly creating the instance for every save/load)

2.52.13 Release

17 Nov 19:55
Compare
Choose a tag to compare
  • Fixed issue with BleDevice.undiscover() where it wasn't disconnecting devices in the middle of the connecting process
  • Updated BluetoothEnabler dialog to not be cancelable from touching outside, or hitting back button, as it was causing issues (there's still the option to cancel within the dialog itself)
  • Fixed issue where scanning would fail on Samsungs, and silently run a classic scan
  • Fixed some bond state flakiness
  • Added a callback for testing MTU size (some phones can change their MTU successfully, but can't write using the new MTU size, this callback allows you to test it out to make sure it works)
  • Updated SweetBlue to build using API 26, and latest gradle, and build tools versions
  • Fixed a couple more possible NPEs related to starting/stopping a scan
  • Fixed possible NPE in P_PollManager
  • Added BleManager.nukeBle() method. It is very experimental, and probably is no different than calling reset(), but we decided to add it to see if there's some value to it.
  • Fixed a couple of possible NPEs related to changing the MTU, or remotely reading rssi values.

2.52.12 Release

11 Oct 16:52
Compare
Choose a tag to compare
  • Fixed possible Exception in the crash resolver
  • Updated logging for device connection state
  • Fixed possible NPE when calling BleManager.getDevices_bonded()
  • Fixed possible ConcurrentModificationException in P_TaskQueue
  • Fixed issue where CLASSIC scan would run forever on >= M if not all permissions are granted, and running a one-time scan
  • Fixed issue where a CLASSIC scan wouldn't work if BleManagerConfig.revertToClassicDiscoveryIfNeeded when trying to explicitly perform a classic scan
  • Deprecated next/previous device methods in BleManager, and BleDevice (let us know if you actively use these methods)
  • Fixed possible NPE when starting/stopping scans on >= L (usually happens if the BLE radio is turned off)
  • Discovered devices had a tendency to get cached for a long time between scans, they are now cleared out after a scan has stopped.
  • Added option BleDeviceConfig.serviceDiscoveryDelay to allow setting a delay between connecting BLE, and service discovery (this option is ignored if you have useGattRefresh set to true).
  • Fixed ArrayIndexOutOfBoundsException when parsing some malformed scan records
  • Fixed issue where the DefaultBondFilter was still unbonding devices which are known to have bonding/connecting issues even when BleDeviceConfig.autoBondFixes is set to false.

2.52.11 Release

08 Sep 18:23
Compare
Choose a tag to compare
  • Fixed issue where BLE_SCAN_READY state wasn't being cleared when BLE gets turned off
  • Fixed issue where cached devices would lose their device names after BLE turns off/on
  • Fixed issue where calling disconnect wouldn't reset the device's state if the device is in RECONNECTING_SHORT_TERM
  • Added BleManagerConfig.forceBondHackInterval to adjust the amount of time to run a classic scan for (which is the hack to make sure the pairing dialog appears)
  • Fixed possible NPE in P_AndroidBluetoothManager (usually seen when running BleManager in a service)
  • Some scan processing optimizations so SweetBlue doesnt get overloaded when a lot of devices are found
  • Fixed possible NPE in L_Util when calling stopScan()
  • Fixed somewhat occurrance where bond/unbond tasks can get replicated in the queue for a device
  • Fixed crash when processing certain malformed scan records on Android 8.0
  • Fixed issue where the device doesn't get disconnected when calling BleDevice.undiscover()
  • Added option BleDeviceConfig.autoBondFixes, to shut off SweetBlue's auto bonding for troubled devices (best to leave this alone unless absolutely necessary)

2.52.10 Release

02 Aug 18:59
Compare
Choose a tag to compare
  • Added more UUIDs from the Bluetooth spec into the Uuids class
  • Updated crash resolver to work with post-lollipop scan api
  • Improved scan duration accuracy (sometimes you'd get a scan for a lot longer than requested)
  • Add guards for opposing states in BleManager (it was previously possible to get the manager in the ON, and OFF states through excessive flipping on/off of the radio)
  • Changed alwaysBondOnConnect boolean to apply to all devices, regardless if the phone has bonding issues
  • Updated NotificationListener to ONLY get notification events (all reads/writes were coming through to this listener as well)
  • Added BleDeviceConfig.RefreshOption enum to specify when SweetBlue should perform a gatt refresh, if useGattRefresh is true. The two options right now are right before service discovery, or after disconnecting.
  • Updated DescriptorFilter logic to accept return value null from the descriptorUuid() method, which will return all characteristics (and so that you can implement your own logic in the onEvent() method)
  • Added logic to prevent potential OutOfBoundsExceptions when clearing items from the task queue.
  • Added delayBetweenTasks option to BleManagerConfig, which allows you to set a delay which will happen between each task in the queue.
  • Fixed issue where useLeTransportForBonding wasn't calling the correct method.

2.52.09 Release

28 Jun 21:24
Compare
Choose a tag to compare
  • Fixed striped writes (they were chopping off 3 bytes each packet)
  • Updated BleScanApi.AUTO option for optimal scan results (it will switch between post and pre lollipop, if available)
  • Fixed issue with WriteBuilder forcing the Type to WRITE
  • Infinite scan now actually performs a modified periodicscan, for better scan results. You can still force a true infinite scan using the ScanOptions class
  • Fixed issue with BondRetryFilter where it was ignoring the maximum attempts
  • Updated BondRetryFilter logic so that if the user is prompted to bond, then no matter what, it will not retry (which can of course be overriden if you implement your own BondRetryFilter).
  • Fixed NPEs that can happen when using BleServer

2.52.08 Release

19 Jun 20:57
Compare
Choose a tag to compare
  • Added BondRetryFilter, along with DefaultBondRetryFilter in BleDeviceConfig, for retrying bonding when certain failures occur.
  • Fixed getLastLogs() method in DebugLogger to actually give the last logs (it was returning from the top of the list)
  • Added new constructor to DebugLogger, so that you can collect log statements, without printing them to logcat (useful for production apps that still want access to SweetBlue logs)
  • ReadWriteEvent.characteristic() had the chance to return the wrong characteristic, which is now fixed (this only applies when dealing with multiple characteristics with the same UUID in the same Service)
  • Updated some scan logic which was causing the update loop to get overloaded
  • Last UhOh time is now stored to disk (which can be shut off in BleManagerConfig), so that if the manager instance somehow gets reinstantiated, the UhOhThrottler will still honor your settings.
  • Fixed issue when trying to write to a characteristic that has multiple write types
  • Updated internal readwrite logic to account for mAuthRetry change in Nougat
  • Fixed memory leak in ConnectionFailEvent\
  • Created P_Const for common static instances used throughout SweetBlue
  • Refactored module from 'app' to 'library' to make more sense