Exemplo n.º 1
0
        public List <Beacon> GetActiveBeeacons()
        {
            List <Beacon> beacons = new List <Beacon>();

            List <MyDeviceView> devlist = bluetooth.GetDeviceList();

            BeaconDB.Upload();
            foreach (MyDeviceView device in devlist)
            {
                if (BeaconDB.Contains(device.id.ToString()))
                {
                    beacons.Add(BeaconDB.Get(device.id.ToString()));
                }
            }
            return(beacons);
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            string id_str       = Device.Id.ToString();
            string id_short_str = GetShortName();
            string name_str;
            string in_base_flag;

            if (this.Device.Name != null)
            {
                name_str = Device.Name.ToString();
            }
            else
            {
                name_str = "n/a";
            }
            if (BeaconDB.Contains(Device))
            {
                in_base_flag = BeaconDB.Get(id_str).ToString();
                return("IB: " + in_base_flag);
            }
            return(id_short_str + "   " + name_str);
        }
Exemplo n.º 3
0
 public BeaconFilter(BluetoothDataLayer bluetooth)
 {
     this.bluetooth = bluetooth;
     BeaconDB.Initialize();
 }