#326·dashbeam

Feature request: UX Enhancement: Persist directory and sort state across SAF file picker sessions

Author: hoobangerCreated Sep 19, 2026Updated Sep 19, 2026
Labelsenhancement

Subsequent invocations of the Android system file picker do not retain the user's previously configured UI state (specifically sorting preferences, e.g., sort by modified date descending). While this is partially a limitation of how the Android OS handles stateless SAF intents, the current UX is highly disruptive when parsing through large directories over multiple sessions.

Steps to Reproduce:

  1. Launch the DashBeam app and trigger the action to add a file.
  2. In the system file picker, navigate to a directory with multiple files.
  3. Change the sorting criteria (e.g., set to "Sort by date modified, newest first").
  4. Select a file to return to the app.
  5. Trigger the action to add another file, reopening the system picker.
  6. Expected result: The picker opens in the same directory with the previously selected sorting state applied.
  7. Actual result: The picker resets to its default state and default sorting order.

Proposed Solution:

  1. At a minimum, capture the URI of the last selected file/directory and pass it via DocumentsContract.EXTRA_INITIAL_URI in the next intent. This will ensure the picker opens in the exact same directory, mitigating some friction.
  2. If standard SAF capabilities are too restrictive for persisting sort states, please consider implementing a custom in-app file picker using the MediaStore API (if the app targets media files) or the java.io.File / SAF DocumentFile APIs to maintain full control over the UI state and sorting logic.

Environment:

  • Device: [Xiaomi 13T]
  • OS: Android [16]
  • App Version: [0.7.1]