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 BluetoothBarrierKeeping_Click(object sender, EventArgs e) { AwarenessBarrier keepingBarrier = BluetoothBarrier.Keep(BluetoothStatus.DeviceCar, BluetoothStatus.Connected); BarrierUtils.AddBarrier(this, KeepBarrierLabel, keepingBarrier, mPendingIntent); }
private void BluetoothBarrierConnecting_Click(object sender, EventArgs e) { AwarenessBarrier connectingBarrier = BluetoothBarrier.Connecting(BluetoothStatus.DeviceCar); BarrierUtils.AddBarrier(this, ConnectiongBarrierLabel, connectingBarrier, mPendingIntent); }