~/talk

Understanding Context

TalkinJapaneseat DroidKaigi 2024 · 2024-09-11..09-13· [android, frontend-architecture]
name:Okumura
links:none on file
slides:none on file

Defines Android Context as the app’s window to resources and system services and shows concrete APIs: Context.getString for locale-specific strings, using NotificationManager obtained from Context to create channels and post notifications, WorkManager.getInstance calling getApplicationContext internally, and Jetpack Compose exposing LocalContext. Explains choosing between Activity vs Application Context for lifecycle correctness (starting an activity with the wrong context requires FLAG_ACTIVITY_NEW_TASK or will crash) and warns that holding an Activity Context in long‑lived objects can cause memory leaks.

AI-written summary · about

  1. 0:00Introduction
  2. 1:12What is context
  3. 4:49Context examples
  4. 8:39Notifications and context
  5. 11:51Context types and usage
  6. 13:14Activity vs application context
  7. 16:24Crash from wrong context
  8. 19:39Memory leaks and context
  9. 21:02Getting context
  10. 22:04Activity context
  11. 22:45Fragment context
  12. 27:57Jetpack Compose context
  13. 29:43Quiz and summary
~/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.