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
This commit is contained in:
Rohit Sangwan
2025-12-11 19:24:13 +05:30
committed by GitHub
parent 3116962e8c
commit fa319416ef
16 changed files with 141 additions and 128 deletions
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.1.0), do not edit directly.
// Autogenerated from Pigeon (v26.1.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -159,7 +159,8 @@ data class UniversalBleScanResult (
val isPaired: Boolean? = null,
val rssi: Long? = null,
val manufacturerDataList: List<UniversalManufacturerData>? = null,
val services: List<String>? = null
val services: List<String>? = null,
val timestamp: Long? = null
)
{
companion object {
@@ -170,7 +171,8 @@ data class UniversalBleScanResult (
val rssi = pigeonVar_list[3] as Long?
val manufacturerDataList = pigeonVar_list[4] as List<UniversalManufacturerData>?
val services = pigeonVar_list[5] as List<String>?
return UniversalBleScanResult(deviceId, name, isPaired, rssi, manufacturerDataList, services)
val timestamp = pigeonVar_list[6] as Long?
return UniversalBleScanResult(deviceId, name, isPaired, rssi, manufacturerDataList, services, timestamp)
}
}
fun toList(): List<Any?> {
@@ -181,6 +183,7 @@ data class UniversalBleScanResult (
rssi,
manufacturerDataList,
services,
timestamp,
)
}
override fun equals(other: Any?): Boolean {
@@ -761,6 +761,7 @@ class UniversalBlePlugin : UniversalBlePlatformChannel, BluetoothGattCallback(),
isPaired = it.bondState == BOND_BONDED,
manufacturerDataList = null,
rssi = null,
timestamp = System.currentTimeMillis()
)
}
)
@@ -1020,7 +1021,8 @@ class UniversalBlePlugin : UniversalBlePlatformChannel, BluetoothGattCallback(),
isPaired = result.device.bondState == BOND_BONDED,
manufacturerDataList = manufacturerDataList,
rssi = result.rssi.toLong(),
services = serviceUuids.map { it.toString() }.toList()
services = serviceUuids.map { it.toString() }.toList(),
timestamp = System.currentTimeMillis()
)
) {}
}