繁体   English   中英

蓝牙LE事件处理程序无一例外退出Windows Phone 8.1

[英]Bluetooth LE event handler quit without exception windows phone 8.1

我正在wp8.1运行时应用程序上执行Bluetooth LE应用程序。 我注册了一个值更改事件,以在新数据传入时进行监听。

heartRateMeasurementCharacteristic.ValueChanged += heartRateMeasurement_DataChanged;

private void heartRateMeasurement_DataChanged(GattCharacteristic sender, GattValueChangedEventArgs args)
{
  //do things
}

过了一会儿,事件不再触发了,rpgram不会抛出异常(我检查了运行时,内存等)。 我该如何调试? 事件线程关闭是否有可能没有任何异常?

在BLE设备持续发送信号的情况下。

这是旧文章,但答案是将heartRateMeasurementCharacteristic设置为全局变量。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM