Bug 15892 - GattState should be an enumeration, and overrides that have GattState should use it
Summary: GattState should be an enumeration, and overrides that have GattState should ...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.10.1
Hardware: All All
: High enhancement
Target Milestone: 4.12.0 (KitKat)
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-11-03 11:19 UTC by bryan costanich
Modified: 2013-12-16 02:37 UTC (History)
3 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description bryan costanich 2013-11-03 11:19:10 UTC
When implementing a GattCallback (http://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html), which is needed to connect to BluetoothLE devices, the member use integers for GattState, see: http://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTED

really, we should have:
public enum GattState {
  Disconnected = 0
  // so on
}

thanks.
Comment 2 Atsushi Eno 2013-11-05 02:01:51 UTC
I'm not sure which exact members you meant, but I can only see BluetoothGattCallback.OnConnectionStateChange() which still didn't have enumified parameter, so I fixed it. Reopen if that's not the case and provide the exact members you have in mind.

[master 8ae8c98]
Comment 3 bryan costanich 2013-11-05 04:47:42 UTC
yeah, that's correct. Thanks, Eno!
Comment 4 narayanp 2013-12-16 02:27:48 UTC
I have checked this issue with android mobile sample 'BluetoothLeGatt' and I am seeing BluetoothGattCallback.OnConnectionStateChange().

All Mac
X.S 4.2.2(build 2)
Mono 3.2.6
X.Android 4.11.0-208
Comment 5 narayanp 2013-12-16 02:37:56 UTC
Now it has enumified parameter.