Skip to main content
The SDK is launched through an ActivityResultContract, so the outcome comes back the same way any other activity result does.

Compose

The token request belongs in a ViewModel, not in the composable. It has to survive configuration changes, and a composable is re-run for reasons that have nothing to do with the user asking to verify:

Views

The same call works from a Fragment. Register it as a field there too.
Never register the launcher in onCreateView or later. registerForActivityResult after the lifecycle reaches STARTED throws LifecycleOwner is attempting to register while current state is RESUMED.

Fetching the token

The token comes from your backend, over your own authenticated endpoint:
Never embed your chmod client id and secret in the app. See Create transaction for the endpoint your backend should expose.

Adding configuration

Pass an SdkConfig to control appearance, copy and capture behaviour. Every field has a default, so SdkConfig() is valid:
Full reference in SDK configuration.

Next

Handling the result

Every outcome, every error code, and surviving process death.