When I try to run the Sensors.Windows
sample project for the Microsoft Band SDK (1.3.10417.1) on my Windows 10 machine I get the following exception:
System.ArgumentException: Value does not fall within the expected range.
at Windows.ApplicationModel.Store.CurrentApp.get_AppId()
at Microsoft.Band.StoreApplicationPlatformProvider`2.GetApplicationIdAsync(CancellationToken token)
at Microsoft.Band.BandClient.StartOrAwakeStreamingSubscriptionTasks()
at Microsoft.Band.BandClient.SensorSubscribe(SubscriptionType type)
at Microsoft.Band.Sensors.BandSensorBase`1.<>c__DisplayClass4.<StartReadingsAsync>b__3()
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 Microsoft.Band.Sensors.BandSensorBase`1.<StartReadingsAsync>d__6.MoveNext()
--- 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`1.GetResult()
at PunchingBand.Models.PunchingModel.<Connect>d__48.MoveNext()
It looks like it's throwing the exception because the SDK uses the CurrentApp
which according to the remarks section here on CurrentAppSimulator
isn't possible if the app isn't listed in the Windows Store.
If the SDK needs access to CurrentApp
how can I get this to work while developing my app? It's not like I can swap CurrentApp
with CurrentAppSimulator
in a pre-compiled assembly.