Skip to content

Trial Data to Private Sheets

Compare
Choose a tag to compare
@MrPickles MrPickles released this 10 Apr 21:45
· 50 commits to master since this release

This version of the library adds writing of individual trial data to private spreadsheets. It adds two new mandatory parameters to the Sheets constructor and adds a new public API call.

The format of a private spreadsheet is more like the old spreadsheet organization. Each column is its own data point, and each row in a column has the PID, timestamp, and trials.

trials

There are a few API changes to this version, but they are quite minor.

  • There's a new constructor. The only difference is that it takes two new parameters, which are the host activity (most of you will just pass in this) and the ID of your private spreadsheet. Below are the old and new constructors.
public Sheets(Host host, String appName, String spreadsheetId);
public Sheets(Host host, Activity hostActivity, String appName, String spreadsheetId, String privateSpreadsheetId);
  • The trial data is written by calling a new method writeTrials. It takes the same input as writeData, except it will need an array of floats (one for each trial). Unlike the beta version of this, you can call them back to back without worrying about any callbacks.
public void writeTrials(TestType testType, String userId, float[] trials);
  • There are three new enum values for the new app (the head sway app) and the tapping app using feet.
Sheets.TestType.LF_TAP
Sheets.TestType.RF_TAP
Sheets.TestType.HEAD_SWAY

As usual, there's (updated) sample code that shows all of this in use.