예제 #1
0
 public static IObservable <BluetoothDevice> WhenDeviceEventReceived(this IAndroidContext context, string action)
 => context.WhenIntentReceived(action).Select(intent =>
 {
     var device = (BluetoothDevice)intent.GetParcelableExtra(BluetoothDevice.ExtraDevice);
     return(device);
 });
예제 #2
0
 public static IObservable <Unit> WhenAdapterStatusChanged(this IAndroidContext context)
 => context.WhenIntentReceived(BluetoothAdapter.ActionStateChanged).Select(_ => Unit.Default);