Nearables and Eddystone discovery are equivalent to ranging, and thus use the foreground scan period. Probably worth documenting this better on our side, thanks for the feedback!
On Android 5.0 (and later) devices capable of hardware-accelerated BLE scanning, the scan period is more of a hint, rather than hard limitation—the chip itself decides when to return scanning results to the phone. Most chips are pretty smart about that, and e.g. will return results less often if the results don’t change too much. On the other hand, they can also return results immediately, rather than wait for the scan to end, if they encounter a new beacon. So it’s both much more energy/CPU efficient, and can actually be more responsive than fully software defined scanning.
I tried it on Nexus 5 => it works. It strives to the value I set up, twice higher but already lower than 5s.
On LG Urbane W150 it doesn’t work. I don’t see any difference, it is still about 5s.
Where can I read more about BLE scanning for Android with such nuances as you described (disable_batch_scanning)?
As I understood correctly, the estimote SDK returns only the last packet from the nearable after a scan is done, right?
Is it possible to write my own implementation of the scan for nearables where I collect all packets received during the scan? As I am missing some packets with moving=true flag.
You could drop down to the BluetoothLeScanner level and detect all the unprocessed Nearable packets. Gonna be quite some extra work though. And chance is, if our SDK can’t detect some of the “moving = true” packets, it’s because the device itself drops them.
disable_batch_scanning - have no effect on Nexus 5 - it does not have batch scanning anyway
force_old_scanning_api - enabling it would ignore disable_batch_scanning because old API did not support it.
When you dig down to Android source code you will find out that on Android 5.0 and higher old Bluetooth scanning API (first present in 4.3) is implemented internally using new API (BluetoothLeScanner).
Remember that these are internal undocumented flags, used for diagnostics and should not be used in production.