~/talk

From Parcelable to @Serializable

Talkat droidcon London 2025 · 2025-10-30..10-31· [kotlin]
links:none on file
slides:none on file

Shows how SavedState uses KotlinX Serialization to replace Parcelable boilerplate by annotating data classes with @Serializable and using top-level helpers like encodeToSavedState/decodeFromSavedState plus delegates for SaveStateRegistryOwner and SaveStateHandle and a Compose helper rememberSerializable. Demonstrates serialized SafeState layout (root empty-string key, nested maps and indexed lists), warns about bigger payloads hitting Android's 1 MB Bundle limit, potential runtime crashes with polymorphism/contextual serializers, and that the on-disk representation is not stable across releases.

AI-written summary · about

  1. 0:00State retention on Android
  2. 1:31Config changes vs process death
  3. 2:55Current state retention solutions
  4. 4:40Prefer Safe State over APIs
  5. 5:43Introducing Kotlinx serialization
  6. 7:29Parcelable’s boilerplate limits
  7. 8:12Simplify serialization with @Serializable
  8. 9:41Safe State and ViewModel delegates
  9. 10:22Compose support rememberSerializable
  10. 12:09How serialization works
  11. 13:36Encoding primitives to Safe State
  12. 15:22Encoding collections and nested objects
  13. 17:10Performance and efficiency
  14. 18:16Size limits and stability
  15. 19:19Runtime crashes and type safety
  16. 20:26Cross-platform support future
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.