-
Notifications
You must be signed in to change notification settings - Fork 0
Examples and Recipes
emrecanozturk edited this page Jul 16, 2026
·
1 revision
The examples are intentionally workflow-shaped. They are not static screens.
Path:
examples/compose-example
Use it to study:
- observing store snapshots
- sending intents from Jetpack Compose
- projecting feature state into view state
- keeping connection behavior outside the view
Good workflow pressures:
- trust checks
- connection state
- failure and recovery
- output routing
Path:
examples/viewmodel-example
Use it to study:
- adapting a view controller to a store
- avoiding Massive View Controller behavior
- keeping upload retry and cancellation in the flow
- rendering projected state
Good workflow pressures:
- progress
- retry
- cancellation
- error display
Path:
examples/compose-example
Build:
./gradlew :examples:compose-example:test
./gradlew :examples:viewmodel-example:test
./gradlew :examples:migration-mvvm:testStates:
idle
validating
requestingToken
waitingForTwoFactor
failed(message)
authenticated(userID)
Key rule:
Two-factor code can only be submitted from waitingForTwoFactor.
States:
idle
selectingFile
uploading(progress)
failed(message)
completed(remoteID)
Use a stable cancellation ID:
upload.current
States:
idle
requestingPermission
permissionDenied
ready
failed(message)
Routes:
settings
States:
idle
validatingCart
authorizingPayment
failed(message)
completed(orderID)
Outputs:
orderCompleted(orderID)
New examples should include:
- at least three states
- at least one side effect
- one failure path
- one test
- clear route or output when relevant
- no business logic in UI
IntentFlow for Android is a workflow-first, AI-ready architecture proposal. Start from behavior, keep reducers pure, keep effects explicit, and let UI adapt to the workflow.