简体   繁体   English

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

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

I am doing a Bluetooth LE app on wp8.1 runtime app. 我正在wp8.1运行时应用程序上执行Bluetooth LE应用程序。 I have registered a value change event to listen when new data are coming. 我注册了一个值更改事件,以在新数据传入时进行监听。

heartRateMeasurementCharacteristic.ValueChanged += heartRateMeasurement_DataChanged;

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

after a while the event is not triggered anymore, and rpgram throw NO exception(I checked runtime, memory etc). 过了一会儿,事件不再触发了,rpgram不会抛出异常(我检查了运行时,内存等)。 How can I debug this? 我该如何调试? Is that possible the event thread is down leaves without any exception? 事件线程关闭是否有可能没有任何异常?

under condition that BLE device is keep sending signal. 在BLE设备持续发送信号的情况下。

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

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

相关问题 Windows Phone Silverlight 8.1蓝牙应用程序到设备元素未找到异常 - Windows Phone Silverlight 8.1 Bluetooth app to device element not found exception App.xaml Windows Phone 8.1中DataTemplate上的事件处理程序 - Event Handler on DataTemplate in App.xaml Windows Phone 8.1 应用程序崩溃而不会在Windows Phone 8.1 xaml中抛出任何异常 - App crashes without throwing any exception in windows phone 8.1 xaml Windows Phone 7事件处理程序 - Event Handler Windows Phone 7 Windows Phone 8.1蓝牙开/关更改 - Windows phone 8.1 Bluetooth on/off change Windows Phone 8.1-低功耗蓝牙和身份验证 - Windows Phone 8.1 - Bluetooth Low Energy and Authentication Windows Phone 8.1 ManipulationDelta事件 - Windows Phone 8.1 ManipulationDelta Event 在Windows Phone 8.1中使用滑动处理程序滑动图像 - Slide image with swipe handler in Windows Phone 8.1 为Windows Phone 8.1加载页面后,长时间运行代码的最佳事件处理程序是什么? - What is the best event handler for long running code after a page is loaded for Windows Phone 8.1? 在Windows开发中与蓝牙通讯并扫描蓝牙LE设备而无需配对 - communicate with and scan for bluetooth LE devices in windows development without pairing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM