For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect data sources

Integration of Thryve SDK takes barely more than a few minutes to connect data sources up and running including native data sources.

Assuming you have set up your mobile app project as outlined and have added the Thryve SDK via dependency management or manually via framework files, you have everything to get going to get your users to connect their data source with your application.

Thryve Connection Widget makes it super simple to allow users to connect theiir data sources

All data connections and data stored at Thryve are always linked to a Thryve user. A Thryve user will be automatically created or an existing user will be retrieved when initializing the SDK.

Initialize the Thryve SDK

Create the ThryveSDK instance using getOrCreate and set up the ThryveSDKConfig object according to your needs. Initializing ThryveSDK will automatically create a new Thryve user or get an existing Thryve user based on endUserAlias.

Parameter
Description
Mandatory

context

default Android context (only relevant for Android integration)

yes

authId

Credentials to authorize your app with the Thryve backend

yes

authSecret

Credentials to authorize your app with the Thryve backend

yes

Create a Thryve user

The SDK will automatically take care of creating new users. It will also take care of managing existing users when endUserAlias is set. Therefore we highly encourage usage of endUserAlias as otherwise you will need to manually manage and set the endUserId for existing users. You can retrieve the endUserId of the current user using getEndUserId method.

Parameter
Description
Mandatory

endUserAlias

Unique identifier for your user that can be set optionally by you. Make sure to set a secure, non-predictable, unique identifier without personal identifiable information.

Maximum length is 80 characters, only alphanumeric characters and dash (-) are supported.

no

endUserId

Identifier used to authenticate your end-user with Thryve in network requests. Only set if you don't use the endUserAlias and want to initialize the SDK for an existing user.

no

Set user language

The configured language is used in the UI provided by Thryve, like the Thryve Connection Widget. If not manually set by your app, the SDK will use the language set on the device.

Parameter
Description
Mandatory

locale

Manually set the language code following ISO 639-1 to set the language that will be used on UI elements, e.g. the Thryve Widget. If empty the SDK will get the phone's language.

no

Display the Thryve Connection Widget

Thryve Connection Widget allows your end users to connect and disconnect all enabled data sources configured for your application without you needing to implement any views or logics.

Thryve Connection Widget makes it super simple to allow users to connect theiir data sources

The Thryve Connection Widget will be launched as a web-view and can be implemented within any view of your application by using ThryveDataSourceConnectionWidget.

Apple Health, Health Connect, and Samsung Health will be shown in the Thryve Connection Widget only if their respective modules are imported and the data source is available on the device.

Parameter
Description
Mandatory

redirectURL

To automatically redirect users after connection or disconnection of web data sources, we recommend configuring a deep link. The specified redirectURI should link the user to the screen where Thryve Connection Widget is embedded within your application

no. applicable to only native, react native and Flutter Android SDKs

For details on configuring the SDK modules for ThryveAppleHealth, ThryveHealthConnect,ThryveSamsungHealth, ThryveBLE and ThryveShenAI modules, refer to their respective documentation pages.

Last updated