A a native implementation is just
val scanPhy = call.getInt("scanPhy", BluetoothDevice.PHY_LE_1M) as Int
scanSettings.setPhy(scanPhy)
inside the extended advertising block in getScanSettings and an enum of the PHYs
However, the bluetooth adapter needs to be checked and an error must be thrown
if the coded phy is set according to https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setPhy(int)
because the controller may not support coded PHY.
I wasn't sure if it was good safe to do that inside (or called via) getScanSettings
Describe the solution you'd like
ble.requestLEScan(
{
scanPhy: ScanPhy.PHY_LE_CODED
allowExtendedAdvertising: true,
}
)
I added a simple draft to show it here #822
A a native implementation is just
inside the extended advertising block in
getScanSettingsand an enum of the PHYsHowever, the bluetooth adapter needs to be checked and an error must be thrown
if the coded phy is set according to https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setPhy(int)
because the controller may not support coded PHY.
I wasn't sure if it was good safe to do that inside (or called via)
getScanSettingsDescribe the solution you'd like
I added a simple draft to show it here #822