问题
Have investigated sample code to subscribe DataLogger to move sensors. https://bitbucket.org/suunto/movesense-mobile-lib/src/master/android/samples/DataLoggerSample/ But failed to subscribe to my own whiteboard resource. As example used jump counter from jump count sample. https://bitbucket.org/suunto/movesense-device-lib/src/master/samples/jumpmeter_app/ WB_RES::LOCAL::SAMPLE_JUMPCOUNTER_JUMPCOUNT::LID
And have tried to connect to it by DataLoggerConfig.DataEntry[] entries = {new DataLoggerConfig.DataEntry('/Sample/JumpCounter/JumpCount')}; But get only last value, not all the values.
What need to do else? Or have some sample of DataLogger service to be configured to subscribe to your own whiteboard resource?
回答1:
There is a bug in the SBEM to JSON conversion (or the .../Descriptors) that causes this if the resource notification type is a simple primitive type (like integer). Change the API to return a complex type and it will work.
Full Disclosure: I work for the movesense team
来源:https://stackoverflow.com/questions/57610986/datalogger-service-to-be-configured-to-subscribe-to-your-own-whiteboard-resource