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

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -