0PricingLogin
Kotlin Multiplatform Academy · Lesson

Read & Write Typed Values

Persist booleans, strings and ints safely.

Typed, Not Stringly

Settings stores more than strings. It has dedicated methods for each basic type, so you keep your data typed and safe. 🧩

Write a String

Use putString to save text under a key. The key is just a label you'll use to read it back later.

settings.putString("username", "ada")

All lessons in this course

  1. Why a Settings Abstraction
  2. Read & Write Typed Values
  3. Defaults & Clearing Keys
  4. Store an Auth Token Securely
← Back to Kotlin Multiplatform Academy