A mobile app can lose its network, be suspended or have its web content process terminated while an answer is arriving. Keep the difference between a surviving page, a recreated page and an uncertain business action visible. This workflow assumes the iOS or Android text-chat installation works.
The widget owns its runtime transport and supported reconnect/replay handling. The app owns whether the WebView survives and how customers recover when it does not. Reconnected transport does not prove that an earlier action failed or that its visible history is complete.
Define the recovery policy
Preserve a surviving screen
Have the app developer keep the same WebView while Help remains open. On foreground return, let that instance recover its transport. Do not reload the page, initialize a second widget or send another launch automatically.
On iOS, the supplied wrapper leaves updateUIView without a reload. On Android,
the supplied Activity forwards onPause()/onResume() to the view. Neither
keeps the operating system from suspending or terminating it. This is a
foreground chat experience, not background messaging or a notification service.
Offer an explicit path after page failure
Use a visible load/process-failure state and Reload support, as in the platform examples. Remove/destroy an invalid view before recreating it. Keep the reload action separate from sending a customer message.
Tell customers that reloading may start a new conversation. Follow the chosen retention policy; session storage cannot guarantee survival through process loss. For account changes, finish logout and isolation before permitting a new load. Do not restore the previous account’s page merely to recover its history.
Resolve uncertain actions before retrying
If the app lost a reply after the customer requested a business action, check that action’s actual result in your backend/business system. For example, a support-ticket creation may have succeeded even though its confirmation did not reach the screen.
Have the integration owner provide a result lookup and duplicate-prevention policy for writes before enabling them. Do not automatically replay a message or tool request because the UI timed out. Offer a retry only when the operation is safe to repeat or you know it did not run. If the result is unknown, direct the customer to check status or contact support.
For an app-owned native runtime client, implement the canonical Errors and recovery behavior and complete-response handling from Developers. The embedded widget’s transport is not an SSE contract for your native client.
Test interruptions
- Start a fresh app conversation and exchange two messages. Background and resume without destroying the view. Check the visible history and send a follow-up.
- Disable networking while an answer is arriving, restore it and return to Help. Check the eventual reply and follow-up behavior. Do not count a connected indicator alone as success.
- Recreate the page/Activity and separately terminate the app or web renderer. Check the stated fresh-start or retained-session behavior and the visible recovery action. Repeat on a physical device.
- Test a controlled write in a sandbox only if your app offers one. Interrupt its reply, inspect the business record and confirm that recovery does not create a duplicate. Otherwise mark write recovery untested.
- Repeat after an agent, hosted-page or app release. Test a fresh conversation and a surviving older conversation independently.
Every return starts a new conversation
Check app recreation before changing session identifiers.
Look for page loads on foreground, unstable SwiftUI identity, repeated Compose factories or Android Activity recreation. The supplied samples intentionally start fresh after a destroyed view; persistent continuity needs additional storage and identity work. Do not force one shared user ID as a workaround.
Messages reappear but the result is uncertain
Check the business outcome separately from replayed display history.
Compare the actual record or operation status with the visible conversation. A replayed message, mounted UI or successful transport handshake does not establish whether a business write completed. Stop automatic retries and use the operation owner’s result/duplicate policy.
The view cannot recover
Replace failed web content and keep recovery explicit.
Use iOS navigation/process callbacks or Android’s renderer-gone callback to show a failure state. Android requires discarding the failed WebView. Check the hosted URL and network before recreating it. If recreation fails, offer your existing support route; never bypass certificate errors or expose credentials.