private void scanToggle_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e)
 {
     if (e.IsChecked)
     {
         // Start the service.
         BeaconServiceController.StartBeaconService(this, 20000, 60000, 5000, 5000, null);
     }
     else
     {
         // Stop the service.
         BeaconServiceController.StopBeaconService(this);
     }
 }
        protected override void OnDestroy()
        {
            base.OnDestroy();

            BeaconServiceController.StopBeaconService(this);

            beaconReceiver.ActionReceived        -= beaconReceiver_ActionReceived;
            beaconReceiver.BeaconExpired         -= beaconExpirationReceiver_ActionReceived;
            serviceStatusReceiver.StatusReceived -= serviceStatusReceiver_StatusReceived;

            beaconReceiver.Dispose();
            serviceStatusReceiver.Dispose();
        }