protected override bool UpdateConnectionIntervalNative(ConnectionInterval interval) { if (_gatt == null || _gattCallback == null) { Trace.Message("You can't update a connection interval for disconnected devices. Device is {0}", State); return(false); } if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop) { Trace.Message($"Update connection interval paramter in this Android API level"); return(false); } try { // map to android gattConnectionPriorities // https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_BALANCED return(_gatt.RequestConnectionPriority((GattConnectionPriority)(int)interval)); } catch (Exception ex) { throw new Exception($"Update Connection Interval fails with error. {ex.Message}"); } }
public Boolean UpdateConnectionInterval(ConnectionInterval interval) { return(this.UpdateConnectionIntervalNative(interval)); }
protected abstract Boolean UpdateConnectionIntervalNative(ConnectionInterval interval);
protected override bool UpdateConnectionIntervalNative(ConnectionInterval interval) { throw new NotImplementedException(); }
protected override bool UpdateConnectionIntervalNative(ConnectionInterval interval) { Trace.Message("Update Connection Interval not supported in UWP"); throw new NotImplementedException(); }
protected override bool UpdateConnectionIntervalNative(ConnectionInterval interval) { Trace.Message("Cannot update connection inteval on iOS."); return(false); }
public bool UpdateConnectionInterval(ConnectionInterval interval) { return(UpdateConnectionIntervalNative(interval)); }
protected abstract bool UpdateConnectionIntervalNative(ConnectionInterval interval);
private bool UpdateConnectionIntervalNative(ConnectionInterval interval) => throw new PlatformNotSupportedException();
public bool UpdateConnectionInterval(ConnectionInterval interval) { throw new NotImplementedException(); }
public bool UpdateConnectionInterval(ConnectionInterval interval) => UpdateConnectionIntervalNative(interval);
private bool UpdateConnectionIntervalNative(ConnectionInterval interval) { Trace.Message("Update Connection Interval not supported in UWP"); return(false); }
public bool UpdateConnectionInterval(ConnectionInterval interval) { return(true); }