androidstoragesaf

SAF (Storage access network) custom options


I am using the Storage Access Framework (SAF) :

Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/svg+xml");
startActivityForResult(intent, 0);

I am using the following extra:

intent.putExtra("android.content.extra.SHOW_ADVANCED", true);

My question is, where this extras to configure certain SAF options are documented? I want to display filenames as default, because thumbs cannot show preview for svg files and it's confusing (and that's the default).


Solution

  • where this extras to configure certain SAF options are documented?

    Most are not documented. The few that are will be documented either on ACTION_OPEN_DOCUMENT or will appear as other defined constants on Intent.

    And, as always, using undocumented Intent extras may lead to inconsistent behavior across devices and OS versions, as Google is not considering those extras to be part of a public, supported API.