Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instead of auto connect, create proxy object & connect in two steps. #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ public void ConnectToDevice (IDevice device)
{
// returns the BluetoothGatt, which is the API for BLE stuff
// TERRIBLE API design on the part of google here.
((BluetoothDevice)device.NativeDevice).ConnectGatt (Android.App.Application.Context, true, this._gattCallback);

// Not using autoConnect flag because there are compatibility issue
// found on HTC One (M7) in Android 5.0.2
var gatt = ((BluetoothDevice)device.NativeDevice).ConnectGatt (Android.App.Application.Context, false, this._gattCallback);
gatt.Connect ();
}

public void DisconnectDevice (IDevice device)
Expand Down