Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.main);
            ActionBar.SetHomeButtonEnabled(true);

            _findAllBeacons = new FindAllBeacons(this);
            _findAllBeacons.BeaconsFound += NewBeaconsFound;

            InitializeContextMenu();
            InitializeListView();
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.main);
            ActionBar.SetHomeButtonEnabled(true);

            _findAllBeacons = new FindAllBeacons(this);
            _findAllBeacons.BeaconsFound += NewBeaconsFound;

            InitializeQuickAction();

            InitializeListView();
        }
Exemplo n.º 3
0
		void LookForBeacons ()
		{
			_findAllBeacons = new FindAllBeacons (this);
			_findAllBeacons.BeaconsFound += NewBeaconsFound;
			if (!_findAllBeacons.IsBluetoothEnabled) {//BT not enabled
				Intent enableBtIntent = new Intent (BluetoothAdapter.ActionRequestEnable);
				//ask user to enable BT
				StartActivityForResult (enableBtIntent, REQUEST_ENABLE_BLUETOOTH);
			} else {
				button.Text = "scanning...";
				//update button label
				_findAllBeacons.FindBeacons ();
				//search for nearby iBeacons
			}
		}
Exemplo n.º 4
0
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.Main);

			// Get our button from the layout resource,
			// and attach an event to it
			Button button = FindViewById<Button> (Resource.Id.myButton);

			_findAllBeacons = new FindAllBeacons(this);
			_findAllBeacons.BeaconsFound += NewBeaconsFound;
			_adapter = new LeDevicesListAdapter(this);
			
			button.Click += delegate {
				LookForBeacons();
				button.Text = string.Format ("{0} Estimote iBeacons detected! Tap to retry.", count);
			};

		}