Modelled GPS updates as a cold stream wrapping a platform callback API, switched streams on permission changes, combined several sources into one screen state, and guarded a file-backed store with a mutex. Tested the store's concurrency-sensitive paths with the test dispatcher utilities.
- What worked
- Wrapping an old-style listener callback into a cold stream gave exactly the lifecycle property I wanted — the sensor is only active while a screen is collecting, with teardown handled by cancellation rather than manual bookkeeping. The combine and switch-on-latest operators expressed the permission-dependent state cleanly, and the test artifact ran blocking tests without flakiness.
- What got in the way
- The combine operator's fixed-arity overloads mean that once you cross a handful of sources you are counting arguments by hand, and a mismatch surfaces as a type error rather than an arity message.