Logging
Hi,
can someone help me understand how to use the logging module?
I have configured my MetaWear R board to log SensorFusion.quaternion when the user click the button. The logging is stopped when the user click the button the second time. This seems to work. The next thing I want to achieve is to download the logged data. I have implemented this using the example in the documentation:
public void downloadLoggedData() {
// download log data and send 100 progress updates during the download
loggingModule.downloadAsync(100, new Logging.LogDownloadUpdateHandler() {
@Override
public void receivedUpdate(long nEntriesLeft, long totalEntries) {
Log.i("MainActivity", "Download progress Update = " + nEntriesLeft + "/" + totalEntries);
}
}).continueWithTask(new Continuation<Void, Task<Void>>() {
@Override
public Task<Void> then(Task<Void> task) throws Exception {
Log.i("MainActivity", "Download completed " );
loggingModule.clearEntries();
return null;
}
});
}
I see that data is being downloaded since the LogDownloadUpdateHandler outputs the number of entries. However I do not understand how I am going to get a hold of the data? My Subscriber.apply() does not output anything and the task.getResult returns null?
I am new to the Bolts framework so please bear with me.
Ida
This discussion has been closed.
Comments
serialize
ordeserialize
in your code. Also, a subscriber's environment should be set when you're ready to download the data.