~/talk

How to ask permission, the clean way

Talkat droidcon Berlin 2021 · 2021-10-20..10-22· [android, software-architecture]
speakerdeck:budius
slides:none on file

Shows a concrete PermissionService that exposes a Flow of permission states and a CompletableDeferred-based suspend request so callers await results instead of juggling callbacks. Implementation parses manifest permissions, updates state on ActivityLifecycleCallbacks (resume), and uses a headless Fragment to invoke system dialogs and complete pending deferreds. Helpers return maps/lists that are 100% unit-testable and repositories check permission flow before accessing system APIs (location, camera), keeping viewmodels and UI free of if/else permission logic.

AI-written summary · about

  1. 0:00Introduction
  2. 2:30Clean architecture recap
  3. 6:27Current permission handling issues
  4. 7:32Dream permission data service
  5. 8:58Permission beta library
  6. 11:27Permission state flow
  7. 13:31Requesting permissions
  8. 15:16Zero UI fragment solution
  9. 17:03Handling activity recreation
  10. 19:49Clean architecture benefits
  11. 20:52Q&A and conclusion
~/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.