Class that manages the connection and data retrieval between your app, Terra, and Health Connect(Including Samsung, and Google Fit)/Freestylelibre


fun instance(devId: String, referenceId: String?,
             context: Context,
             completion: (TerraManager, TerraError?) -> Unit)
  • devId: String ➡ The developer identifier given to your after you signed up on Terra
  • referenceId: String? ➡ This is used by you to identify a user from your server to a terra user
  • context: Context ➡ The context from the activity you are instantiating from
  • completion: @escaping (TerraManager, TerraError?) -> Void ➡ A callback function that is called when the TerraManager class is initialised. If an error has occurred in creation, then the completion will return a TerraError class. Highly recommended to wait for this callback before proceeding