~/talk

Files for miles: Where to store them all?

Talkat Android Dev Summit 2018 · 2018-11-07..11-08· [android, security]
linkedin:jeffsharkey
slides:none on file

Concrete API advice and tradeoffs for storing files on Android: use Context.getFilesDir / getCacheDir / getNoBackupFilesDir / getCodeCacheDir for internal app data, use Storage Access Framework (ACTION_OPEN_DOCUMENT / CREATE_DOCUMENT) for user-owned files, and use Direct Boot by migrating only needed data to device protected storage via createDeviceProtectedStorageContext, UserManager.isUserUnlocked and move methods. Use StorageManager.getAllocatableBytes and allocateBytes for large downloads, getCacheSizeBytes and cache behaviors for quotas, prefer content URIs, FileProvider, ParcelFileDescriptor.detachFd and Android.system.OS over raw file paths.

AI-written summary · about

  1. 0:00Intro
  2. 0:25Internal storage
  3. 1:52External storage
  4. 4:14Device protected storage
  5. 9:07Cached data
  6. 10:54Code snippets
  7. 14:19Sharing content
  8. 15:19Native code
  9. 16:55Media
  10. 17:53Outro
~/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.