You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tested BluetoothKit background scanning and I could not make it work. The issue I have encountered is that scanContinuouslyWithChangeHandler actually scans for 3 seconds, pauses for inBetweenDelay of 3 seconds and starts again. Scanning and pause interval are implemented using timers that do not work in background with phone locked.
Info.plist has correct keys since after changes I have made it worked as expected.
In BKScanner.swift I have cloned scanWithDuration function with different name and did not initialised durationTimer. Then I used new function when/where needed (several other changes had to be made to original code).
However I appreciate all help since BluetoothKit is very good library and I didn't had to write all the code myself (-:
The text was updated successfully, but these errors were encountered:
I don't think it is possible to scan in the background like this. If you need this kind of functionality you will have to use Apple's CoreBluetooth functionality that allows for waking up an app when a connection to a peripheral is restored.
Hi,
I tested BluetoothKit background scanning and I could not make it work. The issue I have encountered is that
scanContinuouslyWithChangeHandler
actually scans for 3 seconds, pauses forinBetweenDelay
of 3 seconds and starts again. Scanning and pause interval are implemented using timers that do not work in background with phone locked.Info.plist has correct keys since after changes I have made it worked as expected.
In BKScanner.swift I have cloned
scanWithDuration
function with different name and did not initialiseddurationTimer
. Then I used new function when/where needed (several other changes had to be made to original code).However I appreciate all help since BluetoothKit is very good library and I didn't had to write all the code myself (-:
The text was updated successfully, but these errors were encountered: