Exemplo n.º 1
0
        public AdapterContext(BleAdapterConfiguration config)
        {
            var opts = new CBCentralInitOptions
            {
                ShowPowerAlert = config?.ShowPowerAlert ?? false,
#if __IOS__
                RestoreIdentifier = config?.RestoreIdentifier ?? "pluginbluetoothle"
#endif
            };

            this.Manager = new CBCentralManager(this, config?.DispatchQueue, opts);
        }
Exemplo n.º 2
0
        public AdapterContext(BleAdapterConfiguration config)
        {
            config = config ?? new BleAdapterConfiguration();
            var opts = new CBCentralInitOptions
            {
                ShowPowerAlert = config.ShowPowerAlert
            };

            if (!config.RestoreIdentifier.IsEmpty())
            {
                opts.RestoreIdentifier = config.RestoreIdentifier;
            }

            this.Manager = new CBCentralManager(this, config.DispatchQueue, opts);
        }
Exemplo n.º 3
0
        public AdapterContext(BleAdapterConfiguration config)
        {
            var opts = new CBCentralInitOptions
            {
                ShowPowerAlert = config.ShowPowerAlert
            };

#if __IOS__
            if (!config.RestoreIdentifier.IsEmpty())
            {
                opts.RestoreIdentifier = config?.RestoreIdentifier;
            }
#endif
            this.Manager = new CBCentralManager(this, config?.DispatchQueue, opts);
        }
Exemplo n.º 4
0
 public CentralManager(BleAdapterConfiguration config = null)
 {
     this.context = new AdapterContext(config);
 }