3
votes

I recently started a Microsoft Band application for Windows Phone 8.1. The application basically uses UV sensors. But the problem here is not the UV, rather just sending the notification.

The code that sends the notification to the Band looks like (And where it goes to the exception):

await bandClient.NotificationManager.SendMessageAsync(tileGuid, "Title", "Body", DateTimeOffset.Now, MessageFlags.ShowDialog);

The full exception is:

(Exception parameter is below this question)
Handled = false
"Device status code: 0xA0D4000A received"

It is thrown from file 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

I searched the web for this exception, but no result. Weird part is, that actually at one point this code worked and sent the notification. It has also sent some exception about "Transport" and "Stream" something, but I cannot re-product those exceptions again right now.

I have done:

  1. Factory reset the Band and reconnect (Unregister and stuff also).
  2. Restart the phone and try other phones.
  3. Moved the notification to be thrown later or earlier in code.

Does anyone happen to have any ideas or such, what could be done and what could be wrong

Exception parameter:

+       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}
2
Because this notification sending worked before, I presumed that maybe somehow I either messed up the Band (That even reset does not help), or we "tired it out" somehow. We had 2 Bands, neither work and give exception. The other at one point did not turn on for 8 hours. In the morning, worked as usual (no notification though, same error).GanDuumar

2 Answers

0
votes

Make sure to verify that the Tile with the GUID passed to the SendMessageAsync() method has first been added to the Band (for example, after a factory reset).

0
votes

Are you able to send a notification to the band not going through the tile? Just a vibrate notification? Those do not require the tile. I would like to rule out the tile as the issue.