Unable to connect to Microsoft band from Background Task -


i'm using ms band sdk version 1.3.10518, when try init band client background task got:

backgroundtaskhost.exe' has exited code 1

the crash happens after following line of code:

dim bands = await microsoft.band.bandclientmanager.instance.getbandsasync() 

i'm able connect band main application on windows phone 8.1 developer preview.

band build version: 10.3.3213.0 09 r

i found solution related await in sub run, solution consists of using : taskinstance.getdeferral

public async sub run(taskinstance background.ibackgroundtaskinstance) implements background.ibackgroundtask.run         dim deferral = taskinstance.getdeferral         dim bands = await microsoft.band.bandclientmanager.instance.getbandsasync           'other work ...             end using        deferral.complete()     end sub 

in addition need user consent main application follow:

bandclient.sensormanager.heartrate.getcurrentuserconsent 

thanks for: httpclient getasync fails in background task on windows 8


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -