Ejemplo n.º 1
0
        public BeaconLocaterAndroid()
        {
            beacons = new List <BeaconItem>();
            context = Forms.Context;

            iBeaconManager  = IBeaconManager.GetInstanceForApplication(context);
            monitorNotifier = new MonitorNotifier();
            rangeNotifier   = new RangeNotifier();

            monitoringRegion = new Region(beaconId, uuid, null, null);
            rangingRegion    = new Region(beaconId, uuid, null, null);

            iBeaconManager.Bind(this);

            rangeNotifier.DidRangeBeaconsInRegionComplete += RangingBeaconsInRegion;
        }
        public BeaconLocaterAndroid()
        {
            beacons = new List <BeaconItem> ();

            //for testing
//			beacons = new List<BeaconItem> {
//				new BeaconItem { Name = "Android1", Minor = "1233", CurrentDistance = 0.5 },
//				new BeaconItem { Name = "Android2", Minor = "1234", CurrentDistance = 0.2 },
//				new BeaconItem { Name = "Android3", Minor = "1235", CurrentDistance = 12.5 },
//			};

            context = Application.Context;

            _iBeaconManager  = IBeaconManager.GetInstanceForApplication(context);
            _monitorNotifier = new MonitorNotifier();
            _rangeNotifier   = new RangeNotifier();

            _monitoringRegion = new Region(beaconId, uuid, null, null);
            _rangingRegion    = new Region(beaconId, uuid, null, null);

            _iBeaconManager.Bind(this);

            _rangeNotifier.DidRangeBeaconsInRegionComplete += RangingBeaconsInRegion;
        }
        public BeaconLocaterAndroid()
        {
            beacons = new List<BeaconItem> ();

            //for testing
            //			beacons = new List<BeaconItem> {
            //				new BeaconItem { Name = "Android1", Minor = "1233", CurrentDistance = 0.5 },
            //				new BeaconItem { Name = "Android2", Minor = "1234", CurrentDistance = 0.2 },
            //				new BeaconItem { Name = "Android3", Minor = "1235", CurrentDistance = 12.5 },
            //			};

            context = Android.App.Application.Context;

            _iBeaconManager = IBeaconManager.GetInstanceForApplication (context);
            _monitorNotifier = new MonitorNotifier ();
            _rangeNotifier = new RangeNotifier ();

            _monitoringRegion = new Region (beaconId, uuid, null, null);
            _rangingRegion = new Region(beaconId, uuid, null, null);

            _iBeaconManager.Bind (this);

            _rangeNotifier.DidRangeBeaconsInRegionComplete += RangingBeaconsInRegion;
        }