Activate a Disconnected Connection

Activating a Previously Disconnected Direct IAS Connection

Overview

The activateDirectConnection method in the b.well SDK enables the activation of already disconnected direct IAS data connections for a given user. Disconnecting a direct connection allows the user's previously retrieved health data to remain, while preventing future retrieval of new health data from the connection. Activating a disconnected network connection enables data transmission to resume across the network.

The purpose of this method is to activate the Disconnected direct connections only. This method will raise an error if user is trying to activate connection when:

  • The connection is in Deleted status for the user.
  • The IAS consent has been revoked for the user.

Method Signature

suspend fun activateDirectConnection(connectionId: String): OperationOutcome
  • connectionId: The unique identifier of the disconnected direct connection to be re-connected to
  • OperationOutcome: Represents the outcome of the activate operation for direct connection.

Best Practices

  • Correct Identification: Ensure that the connectionId provided is accurate to avoid unintentionally re-connecting the wrong connection.
  • Outcome Verification: Analyze the OperationOutcome to understand the result of the disconnect operation, ensuring that it was successful or handling any issues that may have arisen.

Activating a Previously Disconnected Connection (all other types)

For all types of connections other than Direct IAS connections, after a disconnection, the user will need to reconnect in the same manner they connected originally.

  • For OAuth connections, the user will need to go back through the OAuth flow using getOauthUrl using the appropriate connectionId
  • For Basic connections, the user will need to reconnect via createConnection again