Bug 24210 - BluetoothGattCharacteristic.GetValue returning null
Summary: BluetoothGattCharacteristic.GetValue returning null
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 5.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2014-11-01 22:34 UTC by dj_technohead
Modified: 2016-08-08 07:52 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description dj_technohead 2014-11-01 22:34:04 UTC
According to this SO link (http://stackoverflow.com/questions/20014078/what-is-the-proper-method-for-reading-a-gatt-characteristic-in-android) the proper way to read a Gatt characteristic is to call ReadCharacteristic. This is also what the the Xamarin API documentation says it is doing (http://docs.mono-android.net/index.aspx?link=M%3AAndroid.Bluetooth.BluetoothGattCharacteristic.GetValue).

However, when I look at the source for the BluetoothCharacteristic.GetValue() method it appears to be calling GetValue() rather than ReadCharacteristic().

When I test calling BluetoothGattCharacteristic.GetValue() with a known device, service and characteristic, it is returning null for Xamain.Android. When I test the same device, service and characteristic with Xamarin.iOS, I am retrieving data.

Please confirm if this is a bug or not,
Comment 1 Arpit Jha 2014-11-06 00:50:41 UTC
We have checked this issue and unable to reproduce it.

Could you please provide us sample project or steps ,So that I can able to reproduce at our end?
Comment 2 Atsushi Eno 2016-08-08 07:52:26 UTC
marking as NORESPONSE.