-
public class CSVModeDebug-only "CSV-only" recording mode (parity with iOS
csvOnlyMode).When enabled, the SDK skips network upload entirely. Instead, while a delivery is active:
The fused motion stream and the raw accel/gyro/mag streams go to a SQLite database in the session directory (one row per sample), which is exported to per-stream CSV files when the delivery stops.
Lower-rate streams are appended directly to per-stream CSVs as they arrive:
altitude.csv,location.csv,wifi.csv,gnss_status.csv,gnss_measurement.csv,gnss_nav.csv,gnss_ephemeris.csv,gnss_satellite_position.csv. WiFi rows are flattened so each AP in a scan is its own row; GNSS measurements/status are flattened the same way, with parent event/clock fields repeated per row.
Toggle from the test app UI / instrumentation via CSVMode.enabled; check CSVMode.lastSessionDirectory after the delivery has stopped to retrieve the export, or call shareLastSession to fire a system share sheet with every CSV in the directory.
Production callers should leave this
false. Mirrors the iOScsvOnlyMode: BoolandlastCSVSessionDirectory: URL?runtime flags.
-
-
Method Summary
Modifier and Type Method Description final BooleanshareLastSession(Context context, String authority)Open the platform share sheet with all CSV files in lastSessionDirectory. final BooleangetEnabled()When true, sensor data is written to CSV files instead of being uploaded to the server. final UnitsetEnabled(Boolean enabled)When true, sensor data is written to CSV files instead of being uploaded to the server. final FilegetLastSessionDirectory()Set by the SDK when a CSV session directory is created. final UnitsetLastSessionDirectory(File lastSessionDirectory)-
-
Method Detail
-
shareLastSession
final Boolean shareLastSession(Context context, String authority)
Open the platform share sheet with all CSV files in lastSessionDirectory. Returns false if there is nothing to share.
The host app must declare a
FileProviderwith authority${applicationId}.doorstepai.csvprovider(or pass a custom one via authority) and grant access to the SDK's external files dir. See the sample app'sAndroidManifest.xmlandfile_paths.xmlfor the minimal config.
-
getEnabled
final Boolean getEnabled()
When true, sensor data is written to CSV files instead of being uploaded to the server. Default
false— production builds must not flip this on.
-
setEnabled
final Unit setEnabled(Boolean enabled)
When true, sensor data is written to CSV files instead of being uploaded to the server. Default
false— production builds must not flip this on.
-
getLastSessionDirectory
final File getLastSessionDirectory()
Set by the SDK when a CSV session directory is created. Reset to null before the next session starts. Reads of this from the host app should happen after
stopDelivery(...)returns to ensure the export has been flushed.
-
setLastSessionDirectory
final Unit setLastSessionDirectory(File lastSessionDirectory)
-
-
-
-