Skip to main content

io.causallabs.android.compose

//causallabs-android-compose/io.causallabs.android.compose

Package-level declarations

Types

NameSummary
CausalFeatureViewModel[io.causallabs.android.compose]
class CausalFeatureViewModel<ArgsT : FeatureArgs, OutputsT : FeatureOutputs, EventsT : FeatureEvent<>>(request: FeatureRequest<ArgsT, OutputsT>, causalClient: CausalClient<, , >) : ViewModel
ViewModel specific to a Causal Feature. This is responsible for correctly tracking feature impressions, signaling feature events (with the correct impression data), and maintaining QA observers allowing for values to be updated with Server Sent Events.

Functions

NameSummary
CausalFeatureView[io.causallabs.android.compose]
@Composable
fun <OutputsT : FeatureOutputs> CausalFeatureView(viewModel: CausalFeatureViewModel<, OutputsT, >, content: @Composable(FeatureResponse<OutputsT>) -> Unit)
Causal Feature View Wrapper. This wrapper ensures that the CausalFeatureViewModel is wired up correctly allowing for feature impressions and signals to be sent accurately.
DeviceRegistrationView[io.causallabs.android.compose]
@Composable
fun DeviceRegistrationView(deviceId: PersistentId, modifier: Modifier = Modifier)
A screen which can register the current device, based on the input deviceId to the Causal web tools. This is intended for debug application builds only and should not be included in production releases.