Skip to main content

SDK logs and debugging

SDK Logs

Available starting SDK 0.8.0

What are the SDK Logs?

The SDK logs is a zip file containning 3 kinds of file:

  • Bracelet logs: .txt file with technical informations coming from the firmware like commands received / sent, connection status, firmware actions
  • SDK logs: .txt file with technical informations coming from the SDK like the actions performed by the SDK, the BLE scan / communication
  • Sleep files: a copy of the .wiff files generated by the sleep sync and process

With these files the Cosano team will be able to investiguate any situation.

The log files available are today's and yesterday's only.

We will only be able investiguate a situation in this range

How to implement it

Here is how to add the export of the logs to your application:

From SDK 1.1.20

DataSdk.getInstance().getManager().getLogs(context, docFile)

Before SDK 1.1.20

CorsanoSdk.getLogs(requireContext(), docFile)

Full sample code:

val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
val mainActivity = requireActivity() as MainActivity
mainActivity.startActivityForResult(intent) { a, b ->
b?.data?.also { uri ->
val docFile =
DocumentFile.fromTreeUri(requireContext(), uri)
?: return@startActivityForResult
DataSdk.getInstance().getManager().getLogs(context, docFile)
}
}
}

Extract of the file RecentDevicesFragment.kt of the Sample App

This will create a .zip file with all the technical information that we would need for the support. The logs contains a maximum of 5 days of hiytory.

Please send it to us to Mélanie Bortot's email: mbortot@corsano.com

SDK debugging

Export the Realm database

The database content is very useful to debug. In Android studio it can be found: Device File Explorer > data > data > com.corsano.sdk.sample > .realm file

SDK extended temperature data

Available starting SDK 1.1.6

What are the extended temperature data?

Extended temperature data provides additional insights that are crucial for the Corsano team to investigate any issues or feedback related to temperature measurements.

⚠️ Please note: We can only thoroughly investigate temperature-related feedback if this extended data is available.

How to use

Enable / Disable

To enable or disable the extended temperature data collection:

val value = if (isChecked) VitalParameterValue.CONTINUOUS else VitalParameterValue.DISABLE
bleDevice.enqueueCommand(
SetTemperatureRawPlan(value),
{
result("Set Temperature raw $value OK")
},
{
result("Set Temperature raw $value error $it")
})

The data will be automatically synchronized during the automatic download process.

Export the data

CSV export functionality is available here.

Use ExportType.TEMPERATURE_RAW to export the extended temperature data.

Delete the data

Since this data can grow large quickly, it's recommended to delete it regularly:

dataSdkManager?.metricTemperatureRawRepository?.deleteAll(