c# - CurrentMotion is not change in Distance Sensor at Microsoft Band -


i new microsoft band app development. trying detect when user running or walking. listen distance sensor under sensormanger. distance sensor send currentmotion has 5 state :

  • idle
  • jogging
  • running
  • unknown
  • walking

i idle state when walking or running.

all other values : speed, pase, totaldistance update well.

my question : when microsoft band change currentmotion or how can detect user running or not ?

i trying following code :

var pairebands = await bandclientmanager.instance.getbandsasync(); var bandclient = await bandclientmanager.instance.connectasync(pairebands[0]);  bandclient.sensormanager.distance.readingchanged += async (o, e) =>        {            debug.writeline(e.sensorreading.currentmotion.tostring());            debug.writeline(e.sensorreading.speed.tostring());            debug.writeline(e.sensorreading.pace.tostring());            debug.writeline(e.sensorreading.totaldistance.tostring());            debug.writeline(e.sensorreading.distancetoday.tostring());         }  await bandclient.sensormanager.distance.startreadingsasync(); 

sorry this. bug, fixed in next band sdk release.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -