Account Data Processor

This discussion was created from comments split from: Sensor internal timestamp and General Queries.


  • edited December 2017
    from this thread i came to know about reconstruction of timestamp, i implemented code as is here:
    don't know what i am missing here, not getting any output.

    accelerometer.acceleration().addRouteAsync(new RouteBuilder() {
    public void configure(RouteComponent source) {
    source.account().stream(new Subscriber() {
    public void apply(Data data, Object... env) {
    Log.i("MainActivity","realtime" + data.formattedTimestamp().toString());
    }).continueWith(new Continuation<Route, Void>() {
    public Void then(Task<Route> task) throws Exception {
    return null;
    using : 'com.mbientlab:metawear:3.2.0'
  • Did the addRouteAsync task succeed?
  • edited December 2017
    Yes addRouteAsync task output from:
    source.account().stream(new Subscriber()
  • edited December 2017
    Given that you are not getting any output, it is highly unlikely the task did in fact succeed.  Please confirm by adding error handling to the Continuation object.
  • Code is working when we don't use  account() . 
  • Yes the standard stream code should always work, however I am asking (again) that you check if the task failed or not.  I cannot help you further until you have checked the task's status and posted the error message if any.  As stated in my previous post, the task does appear to be failing and your code is simply ignoring the failure..
  • You are right, my code is not able to catch any error or exception.
    addRouteAsync task was not succeed, i put the code under try and catch, did not get any error or data.
  • edited December 2017
    Follow the example code in the Bolts documentation:
  • Thanks Eric,
    My issue was resolved, by updating the firmware.
This discussion has been closed.