diff --git a/docs/html/preview/_book.yaml b/docs/html/preview/_book.yaml index e4f1aba4a27e4..9f538667f36be 100644 --- a/docs/html/preview/_book.yaml +++ b/docs/html/preview/_book.yaml @@ -70,6 +70,8 @@ toc: path: /preview/j8-jack.html - title: Android for Work Updates path: /preview/features/afw.html + - title: Scoped Directory Access + path: /preview/features/scoped-folder-access.html - title: Samples path: /preview/samples.html diff --git a/docs/html/preview/features/scoped-folder-access.jd b/docs/html/preview/features/scoped-folder-access.jd index 932d8a97ccb63..814692d695cfb 100644 --- a/docs/html/preview/features/scoped-folder-access.jd +++ b/docs/html/preview/features/scoped-folder-access.jd @@ -44,6 +44,14 @@ Use this intent to access external storage directories. To get a list of all available volumes, including removable media volumes, use StorageManager.getVolumesList().

+

+On secondary volumes, such as external SD cards, pass in null when calling +StorageVolume.createAccessIntent() to request access to the entire +volume, instead of a specific directory. +StorageVolume.createAccessIntent() returns null if you pass in +null to the primary volume, or if you pass in an invalid directory name. +

+

The following code snippet is an example of how to open the Pictures directory in the primary shared storage:

@@ -122,4 +130,15 @@ user.

If the user denies access to an external directory, do not immediately request access again. Repeatedly insisting on access results in a poor user -experience.

+experience. If a request is denied by the user, and the app requests access +again, the UI displays a Don't ask again checkbox:

+ + +

Figure 1. An application making a +second request for access to removable media.

+ +

If the user selects Don't ask again and denies the request, all +future requests for the given directory from your app will be automatically +denied, and no request UI will be presented to the user.

\ No newline at end of file diff --git a/docs/html/preview/images/scoped-folder-access-dont-ask.png b/docs/html/preview/images/scoped-folder-access-dont-ask.png new file mode 100644 index 0000000000000..5c505d956f5e7 Binary files /dev/null and b/docs/html/preview/images/scoped-folder-access-dont-ask.png differ diff --git a/docs/html/preview/images/scoped-folder-access-dont-ask_2x.png b/docs/html/preview/images/scoped-folder-access-dont-ask_2x.png new file mode 100644 index 0000000000000..612b69f8926fc Binary files /dev/null and b/docs/html/preview/images/scoped-folder-access-dont-ask_2x.png differ diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs index f96bf1f201783..cf38f701a8b28 100644 --- a/docs/html/preview/preview_toc.cs +++ b/docs/html/preview/preview_toc.cs @@ -17,7 +17,7 @@ - + - +
  • Java 8 Language Features
  • Android for Work Updates
  • + +
  • Scoped Directory Access