TemplatedUrlValuesProvider

Callback that injects parameter values into a templated web view URL.

Auto-response messaging components may contain URLs with placeholder path and query parameters. This provider is called when such a URL is about to be rendered, giving the host app an opportunity to fill in the required values (e.g., session tokens or user-specific identifiers).

Register via CoreClient.registerTemplatedUrlValuesProvider.

Samples

coreClient.registerTemplatedUrlValuesProvider { templatedWebView ->
    templatedWebView.apply {
        queryParams.keys.forEach { key ->
            setQueryParameterValue(key, "value")
        }
        pathParams.keys.forEach { key ->
            setPathParameterValue(key, "value")
        }
    }
}

Functions

Link copied to clipboard
abstract suspend fun setValues(input: TemplatedWebView): TemplatedWebView

Fills in path and query parameter placeholders on the given TemplatedWebView.