public BleContext(BleAdapterConfiguration config) { this.Manager = config == null ? new CBCentralManager(this, DispatchQueue.CurrentQueue) : new CBCentralManager(this, config.DispatchQueue, new CBCentralInitOptions { ShowPowerAlert = config.ShowPowerAlert, #if __IOS__ RestoreIdentifier = config.RestoreIdentifier #endif }); }
public AdapterContext(BleAdapterConfiguration config) { this.PeripheralManager = new CBPeripheralManager(); var queue = config?.DispatchQueue ?? DispatchQueue.CurrentQueue; var opts = new CBCentralInitOptions { ShowPowerAlert = config?.ShowPowerAlert ?? false, #if __IOS__ RestoreIdentifier = config?.RestoreIdentifier ?? "acrble" #endif }; this.Manager = new CBCentralManager(this, queue, opts); }
/// <summary> /// You should call this before calling BleAdapter.Current! /// </summary> public static void Init(BleAdapterConfiguration configuration) { Current = new Adapter(configuration); }
public Adapter(BleAdapterConfiguration config = null) { this.context = new AdapterContext(config); this.Advertiser = new Advertiser(this); }
public Adapter(BleAdapterConfiguration config = null) { this.context = new AdapterContext(config); this.Advertiser = new Advertiser(this.context.PeripheralManager); }
public Adapter(BleAdapterConfiguration config = null) { this.context = new AdapterContext(config); this.scanStatusChanged = new Subject <bool>(); }
public Adapter(BleAdapterConfiguration config = null) { this.context = new AdapterContext(config); }