我最近为 Windows Phone 8.1 启动了 Microsoft Band 应用程序。该应用程序基本上使用紫外线传感器。但这里的问题不是紫外线,而只是发送通知。
将通知发送到 Band的代码看起来像(以及它去哪里异常):
await bandClient.NotificationManager.SendMessageAsync(tileGuid, "Title", "Body", DateTimeOffset.Now, MessageFlags.ShowDialog);
完整的例外是:
(Exception parameter is below this question)
Handled = false
"Device status code: 0xA0D4000A received"
它是从文件App.gics 中抛出的:
#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}