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): OperationOutcomeconnectionId: The unique identifier of the disconnected direct connection to be re-connected toOperationOutcome: Represents the outcome of the activate operation for direct connection.
Best Practices
- Correct Identification: Ensure that the
connectionIdprovided is accurate to avoid unintentionally re-connecting the wrong connection. - Outcome Verification: Analyze the
OperationOutcometo 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
getOauthUrlusing the appropriateconnectionId - For Basic connections, the user will need to reconnect via
createConnectionagain
Updated about 2 months ago
