tbrushwyler / Xamarin.BluetoothLE

MIT License
45 stars 27 forks source link

Fix read notifications on iOS #8

Closed kentcb closed 8 years ago

kentcb commented 8 years ago

On Android, invoking Read will raise ValueUpdated when the value becomes available. On iOS, this is not currently the case. This means it's not possible to write platform-agnostic code such as:

characteristic.ValueUpdated += ...;

if (characteristic.CanRead)
{
    characteristic.Read();
}

This will work for Android, but not iOS. And since reads in Android are asynchronous, there is no real workaround.

This PR fixes this by ensuring a call to Read will result in ValueUpdated being raised for iOS too.

kentcb commented 8 years ago

Is this project still being maintained?

I see there's a bitrise failure, but I can't look at the details of the failure (not authorized). Is this PR able to be merged or not?