private void TimeBarrierInSunriseOrSunsetPeriod_Click(object sender, EventArgs e) { AwarenessBarrier sunsetBarrier = TimeBarrier.InSunriseOrSunsetPeriod(TimeBarrier.SunsetCode, -oneHourMilliSecond, oneHourMilliSecond); BarrierUtils.AddBarrier(this, InSunriseOrSunsetPeriodBarrierLabel, sunsetBarrier, mPendingIntent); }
private void TimeBarrierDuringPeriodOfWeek_Click(object sender, EventArgs e) { AwarenessBarrier periodOfWeekBarrier = TimeBarrier.DuringPeriodOfWeek(TimeBarrier.MondayCode, timeZone, 9 * oneHourMilliSecond, 10 * oneHourMilliSecond); BarrierUtils.AddBarrier(this, DuringPeriodOfWeekBarrierLabel, periodOfWeekBarrier, mPendingIntent); }
private void TimeBarrierDuringPeriodOfDay_Click(object sender, EventArgs e) { AwarenessBarrier periodOfDayBarrier = TimeBarrier.DuringPeriodOfDay(timeZone, 11 * oneHourMilliSecond, 12 * oneHourMilliSecond); BarrierUtils.AddBarrier(this, DuringPeriodOfDayBarrierLabel, periodOfDayBarrier, mPendingIntent); }
private void HeadsetBarrierConnecting_Click(object sender, EventArgs e) { // Create a headset barrier. When the headset are connected, the barrier status changes to true temporarily for about 5 seconds. // After 5 seconds, the status changes to false. If headset are disconnected within 5 seconds, the status also changes to false. AwarenessBarrier connectingBarrier = HeadsetBarrier.Connecting(); BarrierUtils.AddBarrier(this, ConnectingBarrierLabel, connectingBarrier, mPendingIntent); }
private void TimeBarrierDuringTimePeriod_Click(object sender, EventArgs e) { long currentTimeStamp = DateTime.Now.Ticks; long tenSecondsMillis = 10 * 1000L; AwarenessBarrier timePeriodBarrierr = TimeBarrier.DuringTimePeriod(currentTimeStamp, currentTimeStamp + tenSecondsMillis); BarrierUtils.AddBarrier(this, DuringTimePeriodBarrierLabel, timePeriodBarrierr, mPendingIntent); }
private void BarrierCombinationTimeBluetooth_Click(object sender, EventArgs e) { // When the Bluetooth car stereo is connected on a weekend, the barrier status is true. AwarenessBarrier combinedTimeBluetoothBarrier = AwarenessBarrier.And( TimeBarrier.InTimeCategory(TimeBarrier.TimeCategoryWeekend), BluetoothBarrier.Keep(BluetoothStatus.DeviceCar, BluetoothStatus.Connected)); BarrierUtils.AddBarrier(this, CombinedTimeBlueToothBarrierLabel, combinedTimeBluetoothBarrier, mPendingIntent); }
private void BarrierCombinationBehaviorHeadset_Click(object sender, EventArgs e) { AwarenessBarrier combinedBehaviorHeadsetBarrier = AwarenessBarrier.And( HeadsetBarrier.Keeping(HeadsetStatus.Connected), AwarenessBarrier.Or(BehaviorBarrier.Keeping(BehaviorBarrier.BehaviorRunning) , BehaviorBarrier.Keeping(BehaviorBarrier.BehaviorOnBicycle))); BarrierUtils.AddBarrier(this, CombinedBehaviorHeadsetBarrierLabel, combinedBehaviorHeadsetBarrier, mPendingIntent); }
private void BehaviorBarrierEnding_Click(object sender, EventArgs e) { AwarenessBarrier endCyclingBarrier = BehaviorBarrier.Ending(BehaviorBarrier.BehaviorOnBicycle); BarrierUtils.AddBarrier(this, EndingBarrierLabel, endCyclingBarrier, mPendingIntent); }
private void LocationBarrierEnter(object sender, EventArgs e) { AwarenessBarrier enterBarrier = LocationBarrier.Enter(latitude, longitude, radius); BarrierUtils.AddBarrier(this, EnterBarrierLabel, enterBarrier, mPendingIntent); }
private void LocationBarrierStay(object sender, EventArgs e) { AwarenessBarrier stayBarrier = LocationBarrier.Stay(latitude, longitude, radius, mTimeOfDuration); BarrierUtils.AddBarrier(this, StayBarrierLabel, stayBarrier, mPendingIntent); }
private void AmbientLightBarrierRange_Click(object sender, EventArgs e) { AwarenessBarrier lightRangeBarrier = AmbientLightBarrier.Range(LowLuxValue, HighLuxValue); BarrierUtils.AddBarrier(this, RangeBarrierLabel, lightRangeBarrier, mPendingIntent); }
private void AmbientLightBarrierAbove_Click(object sender, EventArgs e) { AwarenessBarrier lightAboveBarrier = AmbientLightBarrier.Above(HighLuxValue); BarrierUtils.AddBarrier(this, AboveBarrierLabel, lightAboveBarrier, mPendingIntent); }
private void AmbientLightBarrierBelow_Click(object sender, EventArgs e) { AwarenessBarrier lightBelowBarrier = AmbientLightBarrier.Below(LowLuxValue); BarrierUtils.AddBarrier(this, BelowBarrierLabel, lightBelowBarrier, mPendingIntent); }
private void TimeBarrierInTimeCategory_Click(object sender, EventArgs e) { AwarenessBarrier inTimeCategoryBarrier = TimeBarrier.InTimeCategory(TimeBarrier.TimeCategoryWeekend); BarrierUtils.AddBarrier(this, InTimeCategoryBarrierLabel, inTimeCategoryBarrier, mPendingIntent); }
private void BluetoothBarrierConnecting_Click(object sender, EventArgs e) { AwarenessBarrier connectingBarrier = BluetoothBarrier.Connecting(BluetoothStatus.DeviceCar); BarrierUtils.AddBarrier(this, ConnectiongBarrierLabel, connectingBarrier, mPendingIntent); }
private void HeadsetBarrierKeeping_Click(object sender, EventArgs e) { AwarenessBarrier keepingBarrier = HeadsetBarrier.Keeping(HeadsetStatus.Connected); BarrierUtils.AddBarrier(this, KeepingBarrierLabel, keepingBarrier, mPendingIntent); }
private void HeadsetBarrierDisconnecting_Click(object sender, EventArgs e) { AwarenessBarrier disconnectingBarrier = HeadsetBarrier.Disconnecting(); BarrierUtils.AddBarrier(this, DisconnectingBarrierLabel, disconnectingBarrier, mPendingIntent); }
private void BeaconBarrierMissed_Click(object sender, EventArgs e) { AwarenessBarrier missedBeaconBarrier = BeaconBarrier.Missed(filter); BarrierUtils.AddBarrier(this, MissedBarrierLabel, missedBeaconBarrier, mPendingIntent); }
private void BeaconBarrierKeep_Click(object sender, EventArgs e) { AwarenessBarrier keepBeaconBarrier = BeaconBarrier.Keep(filter); BarrierUtils.AddBarrier(this, KeepBarrierLabel, keepBeaconBarrier, mPendingIntent); }
private void BehaviorBarrierBeginning_Click(object sender, EventArgs e) { AwarenessBarrier beginWalkingBarrier = BehaviorBarrier.Beginning(BehaviorBarrier.BehaviorWalking); BarrierUtils.AddBarrier(this, BeginningBarrierLabel, beginWalkingBarrier, mPendingIntent); }
private void BluetoothBarrierKeeping_Click(object sender, EventArgs e) { AwarenessBarrier keepingBarrier = BluetoothBarrier.Keep(BluetoothStatus.DeviceCar, BluetoothStatus.Connected); BarrierUtils.AddBarrier(this, KeepBarrierLabel, keepingBarrier, mPendingIntent); }
private void BehaviorBarrierKeeping_Click(object sender, EventArgs e) { AwarenessBarrier keepStillBarrier = BehaviorBarrier.Keeping(BehaviorBarrier.BehaviorStill); BarrierUtils.AddBarrier(this, KeepingBarrierLabel, keepStillBarrier, mPendingIntent); }
private void BeaconBarrierDiscover_Click(object sender, EventArgs e) { AwarenessBarrier discoverBeaconBarrier = BeaconBarrier.Discover(filter); BarrierUtils.AddBarrier(this, DiscoverBarrierLabel, discoverBeaconBarrier, mPendingIntent); }