CaptureMediaContract
Activity result contract for capturing media (photos and/or videos) using the device camera.
Files are created in external storage directories:
Photos:
{externalFilesDir}/Pictures/Videos:
{externalFilesDir}/Movies/With fallback to cache directories if external storage is unavailable.
pictureFile and videoFile are set during createIntent and used by parseResult to resolve the captured file. After process death these references are lost; callers can restore them via restoreFilePaths before the pending result is dispatched.
Parameters
The capture mode determining what media types can be captured.
Manager for creating temporary files in external storage.
Optional callback invoked inside createIntent after destination files are created, giving the caller an opportunity to persist the file references before the external activity starts.
Constructors
Functions
Restores pictureFile and videoFile from previously persisted absolute paths.