flutter_blue
flutter_blue copied to clipboard
Add a timestamp to scan result.
This timestamp can be used with a continous scan to filter old results or display them differently. Linked to pauldemarco/flutter_blue#349
This is interesting.
I would prefer to defer any sort of state to the platform, but it doesn't look like Android and iOS carry a timestamp along with the scan result. Android looks to have some sort of monotonic timestamp: https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getTimestampNanos()
I can't think of any gotchas at the moment with this, but let me chew on it for a bit.
Thanks!
This feature would be really helpful for us to sort out scan results that aren't available anymore.
Best regards.
@pauldemarco: I looked for something on the platform side before implementing it myself, but didn't found anything. @d-wolf: that's exactly why I created this pull request