DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › ACTION_OPEN_DOCUMENT

Android Photo Picker vs. Document Picker: Which Should Apps Use to Select Files?

By Freedom251 Team · · 10 min read

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Android Photo Picker when the user is choosing photos or videos. Use the Storage Access Framework (SAF) document picker—usually ACTION_OPEN_DOCUMENT—when the user may choose any document or file. Use ACTION_OPEN_DOCUMENT_TREE when the user must grant access to a folder and everything below it. The right API depends on the content type, whether you need one item or many, and whether access must survive the app closing or the device rebooting.

These pickers return user-authorized content URIs, but they do not grant the same kind of access. Photo Picker is a focused media-selection surface with narrow, selected-item access. SAF is a provider-based file system for documents, folders and cloud-backed items. Treating them as interchangeable leads to confusing UI, unnecessary permissions or URI grants that stop working at the wrong time.

As an Amazon Associate I earn from qualifying purchases.

Quick decision: choose by the user’s job

User need Use Reason
Attach one photo or video Photo Picker, preferably Jetpack PickVisualMedia Purpose-built for visual media and limits access to the item the user selected.
Attach several photos or videos Photo Picker with PickMultipleVisualMedia Provides a multi-select media flow without asking for broad storage access for that selection.
Choose a PDF, text file, ZIP, spreadsheet or another general file SAF ACTION_OPEN_DOCUMENT Shows files exposed by installed DocumentsProvider implementations, including eligible cloud providers.
Choose a folder whose contents the app will use repeatedly SAF ACTION_OPEN_DOCUMENT_TREE Returns a directory grant covering the selected tree and its descendants.
Import a copy of data and then manage that copy yourself Consider ACTION_GET_CONTENT Its semantics fit one-time import/read-copy work better than long-term provider-document access.
Keep a selected document available after a reboot ACTION_OPEN_DOCUMENT plus takePersistableUriPermission() The app explicitly takes the persistable read and/or write grant returned with the result.

A document picker can sometimes expose an image, but that does not make it the best media experience. Conversely, Photo Picker is not a general file browser.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Android Photo Picker actually grants

Android describes Photo Picker as a safe, built-in way for users to grant an app access to only selected images and videos. The app receives URI access for the chosen media rather than a blanket grant to the user’s library. For a flow that simply lets someone attach a picture or clip, this narrow authorization is usually the correct privacy and product model.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Media-only scope

Photo Picker is designed for images and videos. You can constrain the request to images, videos or an appropriate MIME type, and you can request one or multiple items. It is not intended for PDFs, office documents, audio files, arbitrary downloads or a folder tree.

No storage runtime permission for the selection flow

When the user selects media through Photo Picker, the app does not need to request broad storage runtime permission just to complete that selection. This is different from an app that independently browses the entire media library, indexes media in the background or implements its own gallery. Those are separate access models with separate permission requirements.

Local and eligible cloud media

Depending on the device and its configured providers, Photo Picker can surface eligible cloud media as well as local items. Your code should therefore treat the result as a content URI and read it through a ContentResolver; do not assume the selected item is a local filesystem path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the SAF document picker is for

The Storage Access Framework lets users select files exposed by DocumentsProvider implementations. The provider may represent local storage, removable media, a cloud drive or another document service. The result is normally a content:// URI that your app accesses through Android’s resolver APIs.

ACTION_OPEN_DOCUMENT: one or more files

Use ACTION_OPEN_DOCUMENT when the app needs a user-selected document and may need to continue using that provider document. Set a MIME type such as application/pdf, or use a broader type when several formats are valid. Add Intent.EXTRA_ALLOW_MULTIPLE when selecting more than one item makes sense.

The picker may show provider-specific locations and cloud files. The app should inspect the returned URI, query metadata when available and open an input stream rather than converting the URI into a presumed path.

ACTION_OPEN_DOCUMENT_TREE: a directory grant

Use ACTION_OPEN_DOCUMENT_TREE when the user is choosing a directory, not a single file. The resulting tree URI represents the selected directory and its descendants. This is appropriate for workflows such as “choose the folder where backups are stored” or “let the app process files under this directory.” It is not a substitute for a file picker when the user only needs one document.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

ACTION_GET_CONTENT: import-oriented selection

ACTION_GET_CONTENT is useful when the app wants the user to provide data that it will read or copy into app-managed storage. The distinction matters: use ACTION_OPEN_DOCUMENT when continued access to the provider’s document is part of the design, and use ACTION_GET_CONTENT when importing a copy is the real objective.

Photo Picker implementation with AndroidX

Android’s documented Jetpack integration uses the Activity Result API. The guide recommends androidx.activity 1.7.0 or later for these contracts.

Pick one image or video

private val pickMedia = registerForActivityResult(
    ActivityResultContracts.PickVisualMedia()
) { uri ->
    if (uri != null) {
        // Read the selected item through contentResolver.
        uploadOrProcess(uri)
    }
}

fun chooseMedia() {
    pickMedia.launch(
        PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageAndVideo)
    )
}

Use ImageOnly or VideoOnly when the screen accepts only one kind of media. You can also provide a specific MIME type when that is more precise for your feature.

Pick multiple items

private val pickMany = registerForActivityResult(
    ActivityResultContracts.PickMultipleVisualMedia(20)
) { uris ->
    uris.forEach { uri ->
        uploadOrProcess(uri)
    }
}

fun chooseSeveral() {
    pickMany.launch(
        PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)
    )
}

The maximum requested count is a product decision and may be constrained by the device picker. Always handle an empty result: the user can cancel, or the picker can return no items.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What happens on devices without Photo Picker

The Jetpack contract is designed to fall back to ACTION_OPEN_DOCUMENT when Photo Picker is unavailable. That means your result-handling code still needs to follow SAF rules: consume a URI through ContentResolver, check the granted flags and do not rely on a filesystem path. The UI and permission behavior can differ between the native Photo Picker and the fallback.

Implementing ACTION_OPEN_DOCUMENT

Launch a single document request

private val openDocument = registerForActivityResult(
    ActivityResultContracts.OpenDocument()
) { uri ->
    if (uri != null) {
        contentResolver.takePersistableUriPermission(
            uri,
            Intent.FLAG_GRANT_READ_URI_PERMISSION
        )
        readDocument(uri)
    }
}

fun choosePdf() {
    openDocument.launch(arrayOf("application/pdf"))
}

The contract sets up the document intent and delivers a URI when the user completes it. If your app needs multiple formats, pass multiple MIME types or an appropriate broader type. Validate the provider’s returned MIME type and metadata before processing untrusted input.

Multiple documents

For multiple files, use the corresponding Open Multiple Documents Activity Result contract, or construct the intent with EXTRA_ALLOW_MULTIPLE when working directly with intents. Iterate over every URI in the returned clip data and apply the same grant and validation logic to each item.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Keeping URI access after the app closes

A URI grant is a permission, not a permanent file path. If work must continue after the current activity, after the app process is recreated or after a device restart, plan the grant lifecycle explicitly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Persisting an ACTION_OPEN_DOCUMENT grant

  1. Launch ACTION_OPEN_DOCUMENT (or the AndroidX equivalent).
  2. When a URI returns, inspect the intent’s flags for read and/or write access.
  3. Call ContentResolver.takePersistableUriPermission(uri, flags) with only the permissions actually granted.
  4. Store the URI string in app storage so you can reopen it later.
  5. On future launches, attempt to access the URI and handle a revoked or unavailable provider gracefully.

The explicit call is important: simply saving the URI string does not preserve access across a reboot. A provider can also remove, move or revoke a document, so persistent permission is not a guarantee that the content will exist forever.

Photo Picker URI lifetime

Photo Picker access is temporary by default. For background processing or work that outlives the immediate screen, follow the Photo Picker and URI-permission guidance for taking a persistable grant where supported, or copy the selected bytes into app-controlled storage while the temporary grant is valid. Queueing a worker with only an unplanned temporary URI is a common source of failures.

Android version and availability considerations

Capability Relevant level or recommendation Practical meaning
Photo Picker platform API API 33 Native Photo Picker is associated with Android 13 and newer platform behavior.
ACTION_OPEN_DOCUMENT API 19 SAF file selection is available on much older Android releases.
ACTION_OPEN_DOCUMENT_TREE API 21 Directory-tree selection starts with Android 5.0.
Jetpack Photo Picker contracts androidx.activity 1.7.0 or later recommended in the guide Use PickVisualMedia and PickMultipleVisualMedia instead of hand-maintaining every picker variant.
Backport availability Device-dependent Android documents availability on Android 11 and later devices receiving modular system updates, with a Google Play services backport possible for some older supported devices.

Do not infer availability from the OS version alone. The modular component, Google Play services state and device configuration can affect which surface appears. If your product needs to know which picker is available before showing a screen, query the documented availability mechanism and retain a reliable fallback.

Android 14 and custom galleries

Android 14 introduced Selected Photos Access behavior that matters to apps targeting API 34 or higher. An app that maintains its own gallery or independently browses the user’s media must account for selected-media permission behavior, including the READ_MEDIA_VISUAL_USER_SELECTED permission described for custom gallery implementations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This does not turn Photo Picker into a replacement for every gallery architecture. If the user is directing the app to select a few images, prefer Photo Picker and avoid requesting broad media access for that task. If the app must continuously browse, search or organize the library outside a user-initiated selection, evaluate the current Android permission model for that independent access.

Designing the user experience around the API

Match the button label to the content

  • Use labels such as “Choose photo” or “Choose video” for Photo Picker.
  • Use “Select file” or a format-specific label for ACTION_OPEN_DOCUMENT.
  • Use “Choose folder” only for ACTION_OPEN_DOCUMENT_TREE.

Users should not be surprised by a media gallery opening when they expected a PDF browser, or by a folder permission screen when they only wanted one file.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Explain ongoing access

If the app will monitor a folder, sync a document later or process it in the background, explain why the user is being asked for continuing access before launching the picker. Persist the grant only when the feature needs it, and provide a way to remove the saved document or folder from the app.

Handle provider differences

Document providers can return different metadata quality, display names and supported operations. Use OpenableColumns.DISPLAY_NAME and SIZE when available, but tolerate missing values. Read through streams, impose sensible size limits and report provider-specific errors instead of assuming every URI behaves like a local file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and fixes

Requesting storage permission before opening Photo Picker

Symptom: the app asks for broad media or storage access before showing a simple “attach image” flow.

Fix: remove the permission request for that selection path and launch Photo Picker. Reevaluate permissions only if another feature independently needs library-wide access.

Using ACTION_OPEN_DOCUMENT for every attachment

Symptom: a photo-upload screen opens a generic file browser, exposes irrelevant providers and feels unlike a gallery.

Fix: use PickVisualMedia or PickMultipleVisualMedia for images and videos. Keep SAF for documents and the fallback path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Converting a content:// URI into a path

Symptom: code works on one phone but fails for cloud files, removable storage or another provider.

Fix: open the URI with ContentResolver.openInputStream() or openFileDescriptor(), and use provider metadata APIs rather than path conversion.

Saving a URI without taking the grant

Symptom: a recently selected document cannot be opened after reboot.

Fix: call takePersistableUriPermission() immediately after ACTION_OPEN_DOCUMENT returns, using the returned read/write flags, then test the saved URI after a process restart and a device restart.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Using a tree picker for a single file

Symptom: users are asked to grant an entire folder when they only intend to attach one document.

Fix: use ACTION_OPEN_DOCUMENT for one or more files. Reserve ACTION_OPEN_DOCUMENT_TREE for directory-level workflows.

Assuming Photo Picker always exists

Symptom: a custom intent or hard-coded UI fails on an older or differently configured device.

Fix: use the AndroidX contract, which falls back to ACTION_OPEN_DOCUMENT, and test both the native and fallback experiences.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical selection checklist

  1. Identify whether the user is selecting visual media, a general document or a directory.
  2. Choose Photo Picker for user-selected photos and videos.
  3. Choose ACTION_OPEN_DOCUMENT for provider-backed files that may remain linked to the app.
  4. Choose ACTION_OPEN_DOCUMENT_TREE for a directory and its descendants.
  5. Choose ACTION_GET_CONTENT when the feature imports a copy rather than retaining provider access.
  6. Constrain MIME types and single versus multiple selection to match the screen.
  7. Process returned content:// URIs with ContentResolver; never require a real filesystem path.
  8. Persist document grants when later access is required, and test revocation and missing files.
  9. Use AndroidX Activity contracts and verify the fallback on devices without Photo Picker.
  10. For custom galleries targeting API 34 or higher, account for Selected Photos Access instead of assuming a legacy broad-permission model.

Bottom line for app developers

There is no single “Android file picker.” Photo Picker is the focused, privacy-preserving choice for a user selecting images or videos. SAF ACTION_OPEN_DOCUMENT is the general document choice, and ACTION_OPEN_DOCUMENT_TREE is the directory choice. Start with the narrowest API that matches the user’s intent, then design URI handling and permission persistence around how long your feature genuinely needs access.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

ACTION_OPEN_DOCUMENTAndroidAndroid 14KotlinPhoto PickerStorage Access Framework

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.