directoryBasePaths property

ProcessGlobalConfigDirectoryBasePaths? directoryBasePaths
getter/setter pair

Set the base directories that WebView will use for the current process. If this method is not used, WebView uses the default base paths defined by the Android framework.

WebView will create and use a subdirectory under each of the base paths supplied to this method.

This method can be used in conjunction with setDataDirectorySuffix. A different subdirectory is created for each suffix.

The base paths must be absolute paths.

The data directory must not be under the Android cache directory, as Android may delete cache files when disk space is low and WebView may not function properly if this occurs. Refer to this link.

If the specified directories already exist then they must be readable and writable by the current process. If they do not already exist, WebView will attempt to create them during initialization, along with any missing parent directories. In such a case, the directory in which WebView creates missing directories must be readable and writable by the current process.

NOTE: available only if WebViewFeature.STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS feature is supported.

Implementation

ProcessGlobalConfigDirectoryBasePaths? directoryBasePaths;