Hey folks :wave: I’m working on a *conversational...
# android
p
Hey folks 👋 I’m working on a conversational flow for expense splitting in my Android app (something like the screenshots attached). Now I’m trying to refine the flow to handle multiple real-life scenarios dynamically. --- ### Scenario 1: User uploads only the bill (no prompt) 👉 Flow should go like this: 1. Bill uploaded card * “Bill uploaded successfully. Whom do you want to split this with?” * Collect participants (e.g. me, Akhil, Prasanna). 2. Split method card * “How would you like to split this expense? (Equally / By item / Custom share)” * If “Split by item” → show existing item assignment card. 3. Payer card * If no payer is mentioned → “Please select who covered this expense.” 4. Final summary card (new) * Show expense summary (total, split details, payer). * On confirm → Call API once with all collected data. --- ### Key rule: Skip unnecessary cards * If participants are already mentioned in the prompt → skip step 1. * If split method is mentioned → skip step 2. * If payer is mentioned → skip step 3. * If everything is provided → directly show summary card. --- ### My question to the community 🔎 Right now I’m thinking of two possible approaches for handling edge cases (when user mentions some details in the prompt but not all): 1. Keyword-based detection on frontend * Extract participants / split method / payer locally. * Show only the missing cards. * Make one final API call at the end. 2. Delegate parsing to backend * Send the raw prompt to backend. * Backend decides what info is missing and returns the next step. * This would mean calling API at every step of the flow. 💡 Which approach do you think is more efficient and scalable for a chat-like flow in Android? Is keyword-based detection on frontend enough, or is it safer to rely on backend parsing even if that means more network calls? Also, what patterns have you found clean for structuring these multi-step conversational flows in Compose? I’m leaning towards a state machine in ViewModel (sealed classes like
BillUploaded
,
SelectParticipants
,
SelectSplitMethod
,
AssignItems
,
SelectPayer
,
ShowSummary
) but curious if there’s a more elegant solution you’ve used. Any suggestions / best practices would be really helpful 🙏
not kotlin but kotlin colored 4
🧵 7
c
Hey your architecture question on how to build an Android app is off-topic in this workspace. We talk/discuss about Kotlin. And no, just because you build your app with Kotlin is not a justification to ask your question here 😉 That’s what people try to tell you with the not kotlin but kotlin colored already on your previous post. Check the channel description for more suitable resources.
Also, long posts should not be posted on the main thread. Put a TL;DR on the main thread and the details in here.
p
Aah, my mistake… thought #C0B8M7BUY was about Android. Turns out it’s the sacred land of Kotlin monks only🫩 Then why this community for ?
c
Discuss Kotlin questions related to Android as you can read in the channel description.
g
> Then why this community for ? @prasanna It's in the title of the community, about Kotlin, and this channel is about Kotlin in the context of Android It's also a part of Guidelines which you confirmed to join: https://kotlinlang.org/docs/slack-code-of-conduct.html#basic-usage-guidelines > Please remember this is a Slack team for Kotlin. If you have generic questions that are about a technology (which may or may not be used with Kotlin), maybe it's better to use another forum, such as StackOverflow.