C# Microsoft频带异常:0xA0D4000A
我最近为Windows Phone 8.1启动了一个Microsoft Band应用程序。 该应用程序基本上使用紫外线传感器。但是这里的问题不是紫外线,而是发送通知 将通知发送到Band的代码如下所示(以及异常发生的位置): 完全异常是:C# Microsoft频带异常:0xA0D4000A,c#,windows-phone-8,notifications,microsoft-band,C#,Windows Phone 8,Notifications,Microsoft Band,我最近为Windows Phone 8.1启动了一个Microsoft Band应用程序。 该应用程序基本上使用紫外线传感器。但是这里的问题不是紫外线,而是发送通知 将通知发送到Band的代码如下所示(以及异常发生的位置): 完全异常是: (Exception parameter is below this question) Handled = false "Device status code: 0xA0D4000A received" 它是从文件App.g.i.cs中抛出的: #if D
(Exception parameter is below this question)
Handled = false
"Device status code: 0xA0D4000A received"
它是从文件App.g.i.cs中抛出的:
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
#endif
我在网上搜索了这个异常,但没有结果。
奇怪的是,实际上在某一点上,这段代码工作并发送了通知。
它还发送了一些关于“传输”和“流”的异常,但我现在无法重新生成这些异常
我已经做了:
+ Exception {Microsoft.Band.BandOperationException: Device status code: 0xA0D4000A received.
at Microsoft.Band.BandClient.CheckStatus(CargoStatus status, CommandStatusHandling statusHandling)
at Microsoft.Band.BandClient.SendNotification[T](UInt16 notificationId, Guid& tileId, T& notificationInfo, PooledBuffer payload)
at Microsoft.Band.BandClient.SendMessage(Guid& tileId, String title, String body, DateTimeOffset timestamp, MessageFlags flags, CancellationToken token)
at Microsoft.Band.BandClient.<>c__DisplayClass11.<SendMessageAsync>b__10()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Uvicorn.PivotPage.<ThrowNotification>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()} System.Exception {Microsoft.Band.BandOperationException}
+ Exception {Microsoft.Band.BandOperationException: Device status code: 0xA0D4000A received.
at Microsoft.Band.BandClient.CheckStatus(CargoStatus status, CommandStatusHandling statusHandling)
at Microsoft.Band.BandClient.SendNotification[T](UInt16 notificationId, Guid& tileId, T& notificationInfo, PooledBuffer payload)
at Microsoft.Band.BandClient.SendMessage(Guid& tileId, String title, String body, DateTimeOffset timestamp, MessageFlags flags, CancellationToken token)
at Microsoft.Band.BandClient.<>c__DisplayClass11.<SendMessageAsync>b__10()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Uvicorn.PivotPage.<ThrowNotification>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()} System.Exception {Microsoft.Band.BandOperationException}
+异常{Microsoft.Band.BandOperationException:设备状态代码:接收到0xA0D4000A。
在Microsoft.Band.BandClient.CheckStatus(货物状态、命令状态和处理状态)中
在Microsoft.Band.BandClient.SendNotification[T](UInt16 notificationId、Guid和tileId、T和notificationInfo、PooledBuffer有效负载)
在Microsoft.Band.BandClient.SendMessage(Guid&tileId、字符串标题、字符串正文、DateTimeOffset时间戳、MessageFlags标志、CancellationToken标记)
在Microsoft.Band.BandClient.c__DisplayClass11.b_uuuu10()上
在System.Threading.Tasks.Task.InnerInvoke()中
在System.Threading.Tasks.Task.Execute()中
---来自引发异常的上一个位置的堆栈结束跟踪---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)
在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)中
在System.Runtime.CompilerServices.TaskAwaiter.GetResult()中
在Uvicorn.PivotPage.d_u26.MoveNext()中
---来自引发异常的上一个位置的堆栈结束跟踪---
在System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__3(对象状态)
位于System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()}System.Exception{Microsoft.Band.BandOperationException}
确保验证是否已首先将GUID传递给SendMessageAsync()方法的磁贴添加到带区(例如,在出厂重置后)。是否能够向不通过磁贴的带区发送通知?只是一个振动通知?那些不需要瓷砖。我想排除磁砖的问题。因为这个通知发送之前就已经成功了,我推测可能是我搞乱了乐队(即使重置也没有帮助),或者是我们“累了”。我们有两个乐队,既不工作也不例外。另一个在一个点上没有打开8小时。早上,我像往常一样工作(虽然没有通知,但还是相同的错误)。对于GUID,我总是重新创建GUID(和磁贴)。这意味着不会有错误,它采用的是哪种GUID或磁贴。消息发送在GUID(和tile)创建之后立即进行了测试,甚至在以后的代码中也进行了测试。没有区别。